diff options
Diffstat (limited to 'backends/platform/sdl/sdl-window.h')
-rw-r--r-- | backends/platform/sdl/sdl-window.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/backends/platform/sdl/sdl-window.h b/backends/platform/sdl/sdl-window.h index b62860960d..d75e811f56 100644 --- a/backends/platform/sdl/sdl-window.h +++ b/backends/platform/sdl/sdl-window.h @@ -81,14 +81,14 @@ public: SDL_Window *getSDLWindow() const { return _window; } /** - * Creates a new SDL window (and destroys the old one). + * Creates or updates the SDL window. * * @param width Width of the window. * @param height Height of the window. * @param flags SDL flags passed to SDL_CreateWindow * @return true on success, false otherwise */ - bool createWindow(int width, int height, uint32 flags); + bool createOrUpdateWindow(int width, int height, uint32 flags); /** * Destroys the current SDL window. @@ -99,6 +99,15 @@ protected: SDL_Window *_window; private: + uint32 _lastFlags; + + /** + * Switching between software and OpenGL modes requires the window to be + * destroyed and recreated. These properties store the position of the last + * window so the new window will be created in the same place. + */ + int _lastX, _lastY; + bool _inputGrabState; Common::String _windowCaption; #endif |