SDL: avoid assert with SDL debug builds
This commit is contained in:
parent
aea6a243fb
commit
95f1b010f8
1 changed files with 2 additions and 1 deletions
|
@ -350,7 +350,8 @@ bool OpenGLSdlGraphicsManager::loadVideoMode(uint requestedWidth, uint requested
|
|||
Common::Rect desktopRes = _window->getDesktopResolution();
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
bool _isMaximized = (SDL_GetWindowFlags(_window->getSDLWindow()) & SDL_WINDOW_MAXIMIZED);
|
||||
SDL_Window *window = _window->getSDLWindow();
|
||||
bool _isMaximized = window ? (SDL_GetWindowFlags(window) & SDL_WINDOW_MAXIMIZED) : false;
|
||||
if (_isMaximized && ConfMan.hasKey("window_maximized_width", Common::ConfigManager::kApplicationDomain) && ConfMan.hasKey("window_maximized_height", Common::ConfigManager::kApplicationDomain)) {
|
||||
// Set the window size to the values stored when the window was maximized
|
||||
// for the last time.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue