mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-22 10:17:22 +00:00
SDL: avoid assert with SDL debug builds
This commit is contained in:
parent
aea6a243fb
commit
95f1b010f8
@ -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…
x
Reference in New Issue
Block a user