Hi Garden Dwarf,

On my home computer I was able to run your application and I also sometimes received the same error message with the crash. Sometimes it crashes without an error but I also had a few cases where it successfully resized. I found a comment somewhere that said on Windows platforms you need to reinitialize some things after the resize. The fact that I could resize a few times makes me think it isn't a driver issue but some kind of memory allocation or math error due to resizing.

I created a simpler program to demonstrate this error by adding the resizeable option to one of the examples that come with the SDL module. I'm planning to try it tonight on Linux to see what happens.

This isn't my tested version but should be close.

#modified version of SDL-2.548/examples/SDLx/app.pl use SDL::Event; use SDLx::App; my $app = SDLx::App->new( title => "Lines", width => 640, height => 480, resizeable >'on', ); sub draw_lines { $app->draw_line( [ 0, 0 ], [ rand( $app->w ), rand( $ +app->h ) ], 0xFFFFFFFF ); $app->update(); } sub event_handle { my $event = shift; my $app = shift; $app->stop if ( $event->type == SDL_QUIT ); if($event->type==SDL_VIDEORESIZE){ $app->resize($event->resize_w,$event->resize_h); } } $app->add_event_handler( \&event_handle ); $app->add_show_handler( \&draw_lines ); $app->run();

In reply to Re^5: SDL/SDLx issue with application resizing by Lotus1
in thread SDL/SDLx issue with application resizing by Garden Dwarf

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.