From 621fa62e8b21535fc2b6e82d0686f1ae06b7ec7a Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 10 Aug 2011 19:02:13 +1000 Subject: CGE: Save the game if the game is quit via closing the window --- engines/cge/cge_main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/cge/cge_main.cpp') 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); -- cgit v1.2.3