Remember me

Lost Password?

Register now!


Who's Online
104 user(s) are online (89 user(s) are browsing Forums)

Members: 0
Guests: 104


Support us!


Report message:*

Re: SDL2

Subject: Re: SDL2
by kas1e on 2021/4/5 9:36:55


Find out some issue (about which we discuss in mails before) about some game where things messed up when we change window-resolutions.

I find out it that this in end about those 2 lines of code:


SDL_SetWindowSize(m_Window, Width, Height);

That combo works as expected on Linux/win32, but on our side, things messed up (window sets wrong). And solution there is to add some Delay (even IDOS->Delay(5) is ok) between those calls to make all works as expected.

Imho, that point out to us (i hope), that SDL_SetWindowPosition is too fast and didn't check if SDL_SetWindowSize finished, and the second command executed too fast leading to a mess.

I can fast-fix it in code by adding Delay(5) for example which visually will be unnoticed, or something, but isn't it something we need to add to the SDL_SetWindowSize (like, until it not done, we didn't do anything else). Or to the SDL_SetWindowPosition to see if all other SDL operation about window is done firstly and only then do call.

Taking into account that this code works as expected on other platforms, maybe indeed worth checking in SDL itself?

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project