SDL: Fix full screen toggling for 3D games

The previous SdlGraphics3dManager::toggleFullScreen() was not using
beginGFXTransaction / endGFXTransaction in toggleFullScreen().
Restore this logic for 3D games, as using transactions in such games
results in a black screen for 3D games when switching to full screen

A regression from d33487f64
This commit is contained in:
Filippos Karapetis 2021-09-28 23:54:10 +03:00 committed by Paweł Kołodziejski
parent bfb01974f6
commit d54b61dc7a

View file

@ -401,8 +401,12 @@ void SdlGraphicsManager::toggleFullScreen() {
return;
}
bool is3D = g_system->hasFeature(OSystem::kFeatureOpenGLForGame);
if (!is3D)
beginGFXTransaction();
setFeatureState(OSystem::kFeatureFullscreenMode, !getFeatureState(OSystem::kFeatureFullscreenMode));
if (!is3D)
endGFXTransaction();
#ifdef USE_OSD
if (getFeatureState(OSystem::kFeatureFullscreenMode))