QTfrontend/gameuiconfig.cpp
changeset 15320 3bf780084c86
parent 15319 976b3ed9b1fd
child 15685 d92eeb468dad
--- a/QTfrontend/gameuiconfig.cpp	Tue Aug 06 11:41:38 2019 +0200
+++ b/QTfrontend/gameuiconfig.cpp	Tue Aug 06 19:00:51 2019 +0200
@@ -93,6 +93,7 @@
     QString heightStr = QString::number(screenSize.height());
     QString wWidth = value("video/windowedWidth", widthStr).toString();
     QString wHeight = value("video/windowedHeight", heightStr).toString();
+    pIsEngineWindowMaximized = value("video/windowedMaximized", false).toBool();
     // If left blank reset the resolution to the default
     wWidth = (wWidth == "" ? widthStr : wWidth);
     wHeight = (wHeight == "" ? heightStr : wHeight);
@@ -247,6 +248,7 @@
     setValue("video/fullscreenResolution", Form->ui.pageOptions->CBResolution->currentText());
     setValue("video/windowedWidth", Form->ui.pageOptions->windowWidthEdit->value());
     setValue("video/windowedHeight", Form->ui.pageOptions->windowHeightEdit->value());
+    setValue("video/windowedMaximized", vid_Maximized());
     setValue("video/fullscreen", vid_Fullscreen());
 
     setValue("video/quality", Form->ui.pageOptions->SLQuality->value());
@@ -384,6 +386,16 @@
         return result.second;
 }
 
+bool GameUIConfig::vid_Maximized()
+{
+    return pIsEngineWindowMaximized;
+}
+
+void GameUIConfig::vid_SetMaximized(bool isMaximized)
+{
+    pIsEngineWindowMaximized = isMaximized;
+}
+
 bool GameUIConfig::vid_Fullscreen()
 {
     return Form->ui.pageOptions->CBFullscreen->isChecked();