in reply to Re^5: SDL/SDLx issue with application resizing
in thread SDL/SDLx issue with application resizing

I made my code independent of the video buffer. All is computed in "Virtual" buffers at a fixed width/height and then scaled to fit the screen (Rotozoom module). So I don't see any issue with maths.

In the meantime, I was able to observe the same behavior as you reported (time to time resizing works, time to time resizing crashes with a message, and time to time resizing crashes without any error message). It is then quite difficult to investigate, as the result may vary between tries.

I really hope you will find something with your tests. And even if you don't, thanks again for your time ;)

Update

I've tried the opengl example from the Examples folder of the SDL installation (reason: it seems to uses opengl instead of DirectX) and allowed the window to be resized. Result: I can change the size without any issue (note that the image is not resized along with the window, but I don't think it does matter, doesn't it?).

  • Comment on Re^6: SDL/SDLx issue with application resizing

Replies are listed 'Best First'.
Re^7: SDL/SDLx issue with application resizing
by Lotus1 (Vicar) on Feb 01, 2019 at 18:20 UTC

    I didn't explain my statements above very well, it was kind of stream of consciousness. The test code I made was to rule out something in your application. The simple example has the same issues as your program. The error message seems to be coming from SDL::Video::set_video_mode. SDLx::App::resize has the call shown below that should print an error. Since we never see this error the problem is somewhere in this function.

    $self = SDL::Video::set_video_mode( $w, $h, $bpp, $flags ) or die "SDL cannot set video:" . SDL::get_error;

    The functions in SDL::Video are in a dll so this is as far as I got.

      It seems that you've spotted the issue, even if we cannot fix it as it is in SDL dll. Should we report the issue somewhere?