Question about fullscreen

im on Windows 7 64 bits, everytime i go fullscreen with:
SDL_SetWindowFullscreen(glrender->mainWindow,SDL_WINDOW_FULLSCREEN);

and then i change to window mode with
SDL_SetWindowFullscreen(glrender->mainWindow,SDL_WINDOW_SHOWN);

after doing that, while on window mode, if i close the application, the screen blinks on black for a second, why is that? is there a workaround for that?

I’m not sure why that would happen in windowed mode. You can try the
SDL_WINDOW_FULLSCREEN_DESKTOP flag. That way you don’t get a screen
resolution switch at all.

Jonny DOn Fri, May 16, 2014 at 4:54 PM, javierecf wrote:

im on Windows 7 64 bits, everytime i go fullscreen with:
SDL_SetWindowFullscreen(glrender->mainWindow,SDL_WINDOW_FULLSCREEN);

and then i change to window mode with
SDL_SetWindowFullscreen(glrender->mainWindow,SDL_WINDOW_SHOWN);

after doing that, while on window mode, if i close the application, the
screen blinks on black for a second, why is that? is there a workaround for
that?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

i think SDL_WINDOW_FULLSCREEN_DESKTOP takes the resolution from the desktop
and does not scale the contents at all, thats not what im looking for,
SDL_WINDOW_FULLSCREEN does the correct scale and it works well. thanks for
the advice anyway.

does anyone see the same effect on theirs machines?, working on windows
7?..

2014-05-16 14:59 GMT-06:00 Jonathan Dearborn :> I’m not sure why that would happen in windowed mode. You can try the

SDL_WINDOW_FULLSCREEN_DESKTOP flag. That way you don’t get a screen
resolution switch at all.

Jonny D

On Fri, May 16, 2014 at 4:54 PM, javierecf <@Javier_Flores> wrote:

im on Windows 7 64 bits, everytime i go fullscreen with:
SDL_SetWindowFullscreen(glrender->mainWindow,SDL_WINDOW_FULLSCREEN);

and then i change to window mode with
SDL_SetWindowFullscreen(glrender->mainWindow,SDL_WINDOW_SHOWN);

after doing that, while on window mode, if i close the application, the
screen blinks on black for a second, why is that? is there a workaround for
that?


SDL mailing list
SDL at lists.libsdl.org
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


Javier Flores

Hi, I noticed the same problem and I’ve already dealt with it in the past, before I started using SDL. The problem is usually related to the way you change display settings on Windows. SDL makes changes which will be automatically reverted when application exits, at which point Windows will restore system settings. Sadly, it’s not smart enough to notice that display settings do not need changing, which results in a pointless display mode switch. I wrote a small patch that should help solve the issue, though I don’t know when/if this will be part of SDL (I’m not sure my fix is entirely correct in regards to what SDL wants to do at that point :slight_smile: ).

You can find the patch here: http://forums.libsdl.org/viewtopic.php?t=10359