Fix full-screen being disabled when going to preferences but not viewing display options

This commit is contained in:
elasota
2020-07-21 12:23:13 -04:00
parent 53ecdabb43
commit 3fd7fabb98

View File

@@ -918,8 +918,6 @@ void DisplayUpdate (Dialog *theDialog)
SetDialogItemValue(theDialog, k32BitColorItem, wasDepthPref == 32);
SetDialogItemValue(theDialog, kScaleResolutionItem, (short)isAutoScale);
SetDialogItemValue(theDialog, kUseICCProfileItem, (short)isUseICCProfile);
wasFullscreenPref = PortabilityLayer::HostDisplayDriver::GetInstance()->IsFullScreen();
SetDialogItemValue(theDialog, kFullScreenItem, wasFullscreenPref);
FrameDisplayIcon(theDialog, StdColors::Red());
@@ -1286,6 +1284,8 @@ void DoSettingsMain (void)
leaving = false;
nextRestartChange = false;
wasFullscreenPref = PortabilityLayer::HostDisplayDriver::GetInstance()->IsFullScreen();
Window* exclWindow = prefDlg->GetWindow();
PortabilityLayer::WindowManager::GetInstance()->SwapExclusiveWindow(exclWindow); // Push exclusive window