[SDL] How to detect if the screen resolution changed? (windowed)

Alex Barry alex.barry at gmail.com
Sun Feb 5 07:12:13 PST 2012


Sorry, I should have asked, are you using SDL2/1.3 ?
Check out
http://wiki.libsdl.org/moin.cgi/SDL_WindowEvent?highlight=%28%5CbCategoryStruct%5Cb%29%7C%28CategoryEvents%29%7C%28SGStructures%29

It may be that you're not checking for the window resize event properly.

Take care,
-Oz

On Sat, Feb 4, 2012 at 10:48 PM, RodrigoCard <cuecax at gmail.com> wrote:

> **
> I tested this on OS X 10.7 and got no events.
> I suppose that SDL send a RESIZED event only if the app is fullscreen.
> But I did not test that, because I want to know the resolution change when
> my app is windowed.
>
> I want to know that because I need to reposition some windows according to
> the new screen bounds...
>
>
>
>
>  MrOzBarry wrote:
>
>  I'd assume SDL would get a window resize event (fired after you release
> the click from the resize, at least in the Microsoft windows manager)..
>
> -Oz
>
> On Sat, Feb 4, 2012 at 10:09 PM, RodrigoCard <> wrote:
>
>
>
>  Quote:
>
>  How can I know when the screen resolution is changed (not in fullscreen
> mode) by the OS?
>
> I searched in the documentation and cant find anything. =(
>
> Thanks
>
>
> _______________________________________________
> SDL mailing list
>
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>
>
>
>
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20120205/f7971202/attachment-0008.htm>


More information about the SDL mailing list