mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 16:03:05 +00:00
OPENGLSDL: Always ignore bad resolution changes.
Otherwise we can end up with the wrong resolution when we make multiple resizes in quick succession.
This commit is contained in:
parent
8ca3316e3a
commit
92e02457f5
@ -104,11 +104,6 @@ void OpenGLSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable)
|
||||
case OSystem::kFeatureFullscreenMode:
|
||||
assert(getTransactionMode() != kTransactionNone);
|
||||
_wantsFullScreen = enable;
|
||||
// When we switch to windowed mode we will ignore resize events. This
|
||||
// avoids bad resizes to the (former) fullscreen resolution.
|
||||
if (!enable) {
|
||||
_ignoreResizeEvents = 10;
|
||||
}
|
||||
break;
|
||||
|
||||
case OSystem::kFeatureIconifyWindow:
|
||||
@ -359,6 +354,11 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
|
||||
setActualScreenSize(_hwScreen->w, _hwScreen->h);
|
||||
}
|
||||
|
||||
// Ignore resize events (from SDL) for a few frames. This avoids
|
||||
// bad resizes to a (former) resolution for which we haven't
|
||||
// processed an event yet.
|
||||
_ignoreResizeEvents = 10;
|
||||
|
||||
return _hwScreen != nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user