SDL: Do not allow toggle fullscreen for backends which can lose opengl context used for 3d games. (#2514)
This commit is contained in:
parent
495eb1b370
commit
59ba9cb715
8 changed files with 16 additions and 7 deletions
|
@ -123,8 +123,10 @@ bool SdlGraphics3dManager::notifyEvent(const Common::Event &event) {
|
|||
}
|
||||
|
||||
void SdlGraphics3dManager::toggleFullScreen() {
|
||||
if (!g_system->hasFeature(OSystem::kFeatureFullscreenMode))
|
||||
if (!g_system->hasFeature(OSystem::kFeatureFullscreenMode) ||
|
||||
(!g_system->hasFeature(OSystem::kFeatureFullscreenToggleKeepsContext) && g_system->hasFeature(OSystem::kFeatureOpenGLForGame))) {
|
||||
return;
|
||||
}
|
||||
|
||||
setFeatureState(OSystem::kFeatureFullscreenMode, !getFeatureState(OSystem::kFeatureFullscreenMode));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue