aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl/sdl-window.cpp
AgeCommit message (Collapse)Author
2017-07-29SDL: Make the window size when exiting fullscreen workaround macOS specificBastien Bouclet
The call to SDL_SetWindowSize works around a macOS specific SDL2 bug. Fixes the window not restoring to its previous position when exiting fullscreen on Linux/X11.
2017-07-27SDL: Make sure we get the correct window size with SDL2Thierry Crozat
When updating or recreating the window, if we changed the window size at the same time we also toggle between OpenGL and non OpenGL mode, or toggle fullscreen mode, we may have a pending SDL resize event with the wrong size. So we need to make sure to append another one with the correct size to end up with the correct size. This fixes bug #9971.
2017-07-06SDL: Fix compilation with SDL1.2Colin Snover
2017-07-06SDL: Only recreate SDL2 window when necessaryColin Snover
Destroying and recreating the SDL window whenever the video mode changes in SDL2 is not necessary and causes several problems: 1. In windowed mode, the game window shifts position; 2. In fullscreen mode in macOS, every time the window is recreated, it causes the OS to play its switch-to-fullscreen animation again and emit system alert noises; 3. The window content flickers; and 4. The engine loses events from the old destroyed window. This patch changes the SDL backend code to avoid destroying and recreating the SDL window when using SDL2, except when switching OpenGL modes, since there is no way to change the OpenGL feature of a window. There are still some outstanding issues with OpenGL where window size ends up getting reset even though the user has resized it; this will probably need to be addressed at some point in another patch. Thanks to @bgK and @criezy for their feedback which made this patch much better. Co-Authored-By: Bastien Bouclet <bastien.bouclet@gmail.com>
2016-09-04SDL: Move mouse in SDL2 only when window has focus.Eugene Sandulenko
2015-03-01SDL: Call setupIcon for each window creation with SDL2.Johannes Schickel
This should make sure that the logo is properly set on Win32 with SDL2.
2015-02-18WINCE: Fix compilation.Johannes Schickel
2015-02-16WIN32: Add experimental SDL2 support.Johannes Schickel
Based on changes by aquadran.
2015-02-16SDL: Handle icon setup in SdlWindow.Johannes Schickel
2015-02-16SDL: Add basic abstraction class for the SDL window.Johannes Schickel