The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL window restore SDL_VIDEORESIZE event issue...
datahead8888


Joined: 07 Dec 2009
Posts: 5
I've been working on an SDL/OpenGL program, that among other things, must deal with resizing events in order to adjust the aspect ratio.

It doesn't always seem to get the SDL_VIDEORESIZE event when it should, causing the aspect ratio to not be adjusted as needed.

I've run it in debug mode and made these observations:
*When it initially starts up, if I maximize the window, it receives the SDL_VIDEORESIZE event as needed.
*If, after starting up the the application and maximizing the window, I then restore the window by double clicking the title bar, it does NOT receive the SDL_VIDEORESIZE event.
*I can repeat the last two steps, and it will get continue to get the SDL_VIDEORESIZE on the maximize but not get one on the restore.
*If I then do a slight adjustment to the width or height of the window, it will get the SDL_VIDEORESIZE event.
*From then on, if I do restore operations to the window, the SDL_VIDEORESIZE event will be caught properly.

I then did some research, and found this documentation:
http://www.libsdl.org/release/changes-1.2.html

Under SDL 1.2.10 Release Notes, section "Windows Notes", it reads:
*An SDL_VIDEORESIZE event is properly sent when the SDL window is maximized and restored.

This tells me a bug fix was put in for this issue as of SDL Version 1.2.10

I was using SDL Version SDL-1.2.13, on Windows Vista.
Thinking that the version number was my problem, I've now changed it to version SDL-1.2.14.

The problem persists. Since both versions I tried were past version 10, I wouldn't think this issue should have ever happened.

Would anyone have any thoughts on what might cause this?
SDL window restore SDL_VIDEORESIZE event issue...
Sam Lantinga


Joined: 10 Sep 2009
Posts: 1765
Yes, this should be fixed in 1.2.14. Can you enter a bug in bugzilla
with a simple test program and exact steps?

http://bugzilla.libsdl.org/

Thanks!

On Sun, Dec 6, 2009 at 4:23 PM, datahead8888 wrote:
Quote:
I've been working on an SDL/OpenGL program, that among other things, must
deal with resizing events in order to adjust the aspect ratio.

It doesn't always seem to get the SDL_VIDEORESIZE event when it should,
causing the aspect ratio to not be adjusted as needed.

I've run it in debug mode and made these observations:
*When it initially starts up, if I maximize the window, it receives the
SDL_VIDEORESIZE event as needed.
*If, after starting up the the application and maximizing the window, I then
restore the window by double clicking the title bar, it does NOT receive the
SDL_VIDEORESIZE event.
*I can repeat the last two steps, and it will get continue to get the
SDL_VIDEORESIZE on the maximize but not get one on the restore.
*If I then do a slight adjustment to the width or height of the window, it
will get the SDL_VIDEORESIZE event.
*From then on, if I do restore operations to the window, the SDL_VIDEORESIZE
event will be caught properly.

I then did some research, and found this documentation:
http://www.libsdl.org/release/changes-1.2.html

Under SDL 1.2.10 Release Notes, section "Windows Notes", it reads:
*An SDL_VIDEORESIZE event is properly sent when the SDL window is maximized
and restored.

This tells me a bug fix was put in for this issue as of SDL Version 1.2.10

I was using SDL Version SDL-1.2.13, on Windows Vista.
Thinking that the version number was my problem, I've now changed it to
version SDL-1.2.14.

The problem persists. Since both versions I tried were past version 10, I
wouldn't think this issue should have ever happened.

Would anyone have any thoughts on what might cause this?

________________________________
Always respect knowledge.
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





--
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
datahead8888


Joined: 07 Dec 2009
Posts: 5
I'll try to get the bug logged along with a demo program in a day or two.

I need to skim it down to a simpler program that better demonstrates the apparent problem. I'll post the bug id here when it's logged.

Thanks for your feedback.
SDL window restore SDL_VIDEORESIZE event issue...
Sam Lantinga


Joined: 10 Sep 2009
Posts: 1765
Great, thanks!

On Wed, Dec 9, 2009 at 6:52 PM, datahead8888 wrote:
Quote:
I'll try to get the bug logged along with a demo program in a day or two.

I need to skim it down to a simpler program that better demonstrates the
apparent problem. I'll post the bug id here when it's logged.

Thanks for your feedback.

________________________________
Always respect knowledge.
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





--
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Logged the Apparent Bug...
datahead8888


Joined: 07 Dec 2009
Posts: 5
Bug 907

I included a Visual C++ Express 2008 Example along with the required details.

Let me know if you need any additional information.

Thanks for your help on this.