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
Fullscreen + rescaling applies only after a delay
albert


Joined: 22 Oct 2009
Posts: 29
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
Fullscreen + rescaling applies only after a delay
Alex Szpakowski
Guest

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:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: Fullscreen + rescaling applies only after a delay
albert


Joined: 22 Oct 2009
Posts: 29
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