Fullscreen + rescaling applies only after a delay

Hi,

I’m creating a window with SDL_WINDOW_FULLSCREEN_DESKTOP and then a renderer on it where I use SDL_RenderSetLogicalSize.

The window does not get into fullscreen + the rescaling is not applied for a few frames (rounds of SDL_PollEvent). Is that expected behavior?

As a workaround, I was doing while(SDL_PollEvent()); right after I created the window, the renderer and SDL_RenderSetLogicalSize. This put me right into fullscreen, but the render logical size rescaling was still not applied.

I tried several things, but in the end, this code also has the renderer rescaling applied:

while(SDL_PollEvent());
SDL_WaitEvent();
while(SDL_PollEvent());

I’m not sure if this is expected or how I should handle this.

Can someone clarify this?

(I’m on MacOSX with SDL 2.0.3, if that matters.)

Thanks,
Albert

The behaviour for switching in and out of FULLSCREEN_DESKTOP in OS X is different in SDL 2.0.4, it blocks while the transition is happening now.On Sep 10, 2014, at 11:24 AM, albert wrote:

Hi,

I’m creating a window with SDL_WINDOW_FULLSCREEN_DESKTOP and then a renderer on it where I use SDL_RenderSetLogicalSize.

The window does not get into fullscreen + the rescaling is not applied for a few frames (rounds of SDL_PollEvent). Is that expected behavior?

As a workaround, I was doing while(SDL_PollEvent()); right after I created the window, the renderer and SDL_RenderSetLogicalSize. This put me right into fullscreen, but the render logical size rescaling was still not applied.

I tried several things, but in the end, this code also has the renderer rescaling applied:

while(SDL_PollEvent());
SDL_WaitEvent();
while(SDL_PollEvent());

I’m not sure if this is expected or how I should handle this.

Can someone clarify this?

(I’m on MacOSX with SDL 2.0.3, if that matters.)

Thanks,
Albert


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

Alex Szpakowski wrote:

The behaviour for switching in and out of FULLSCREEN_DESKTOP in OS X is different in SDL 2.0.4, it blocks while the transition is happening now.

[/quote]

Cool! That’s like I want it.

When will SDL 2.0.4 be released? I guess the related thread is here… https://forums.libsdl.org/viewtopic.php?t=10532