aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cge/cge_main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index 71acd2a522..4d3b3b251e 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -1568,6 +1568,10 @@ void CGEEngine::runGame() {
mainLoop();
}
+ // If finishing game due to closing ScummVM window, explicitly save the game
+ if (!_finis)
+ qGame();
+
_keyboard->setClient(NULL);
_snail->addCom(kSnClear, -1, 0, NULL);
_snail_->addCom(kSnClear, -1, 0, NULL);