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:
historic_bruno
2014-09-28 22:10:09 +00:00
parent 2afeec0c01
commit f10bdf5089
3 changed files with 39 additions and 9 deletions
+2
View File
@@ -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