mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-09 07:59:40 +00:00
Fixes some issues when toggling fullscreen mode with SDL2, refs #2041:
* SDL_WINDOW_RESIZABLE must be set when creating the window, apparently only fullscreen flags take effect in SDL_SetWindowFullscreen * Stores window position, so a window can be restored to both its original position and size, rather than defaults * Changes initial window position from undefined to centered, it caused some problems with window positioning returning from fullscreen mode This was SVN commit r15827.
This commit is contained in:
@@ -109,6 +109,8 @@ static InReaction MainInputHandler(const SDL_Event_* ev)
|
||||
g_ResizedW = ev->ev.window.data1;
|
||||
g_ResizedH = ev->ev.window.data2;
|
||||
break;
|
||||
case SDL_WINDOWEVENT_MOVED:
|
||||
g_VideoMode.UpdatePosition(ev->ev.window.data1, ev->ev.window.data2);
|
||||
}
|
||||
break;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user