aboutsummaryrefslogtreecommitdiff
path: root/engines/cge/cge_main.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2011-08-10 19:02:13 +1000
committerPaul Gilbert2011-08-10 19:02:13 +1000
commit621fa62e8b21535fc2b6e82d0686f1ae06b7ec7a (patch)
tree37095021a31a9e3d8230f57b6626182939e283ba /engines/cge/cge_main.cpp
parent7ae8f8ce69ba27b4ee2c1b42dcb624d59edcdfe0 (diff)
downloadscummvm-rg350-621fa62e8b21535fc2b6e82d0686f1ae06b7ec7a.tar.gz
scummvm-rg350-621fa62e8b21535fc2b6e82d0686f1ae06b7ec7a.tar.bz2
scummvm-rg350-621fa62e8b21535fc2b6e82d0686f1ae06b7ec7a.zip
CGE: Save the game if the game is quit via closing the window
Diffstat (limited to 'engines/cge/cge_main.cpp')
-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);