diff options
author | Paul Gilbert | 2018-03-20 22:06:22 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-03-20 22:06:22 -0400 |
commit | 0a5dcfb83323a478bc89e641e7478740b252101a (patch) | |
tree | 3b3d4daedd1cf22f7ed7517982f3badfe53b39fe /engines | |
parent | 078ea7228e1634f986e8ab04ed47b93d3a42468a (diff) | |
download | scummvm-rg350-0a5dcfb83323a478bc89e641e7478740b252101a.tar.gz scummvm-rg350-0a5dcfb83323a478bc89e641e7478740b252101a.tar.bz2 scummvm-rg350-0a5dcfb83323a478bc89e641e7478740b252101a.zip |
XEEN: Fix GMM savegame loads were waiting until a turn had passed
Diffstat (limited to 'engines')
-rw-r--r-- | engines/xeen/interface.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/xeen.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/xeen.h | 5 |
3 files changed, 7 insertions, 2 deletions
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp index aa58f25d74..16497eca95 100644 --- a/engines/xeen/interface.cpp +++ b/engines/xeen/interface.cpp @@ -267,7 +267,7 @@ void Interface::perform() { _buttonValue = 0; do { events.pollEventsAndWait(); - if (g_vm->shouldExit() || party._partyDead) + if (g_vm->shouldExit() || g_vm->isLoadPending() || party._partyDead) return; if (events._leftButton && WAIT_BOUNDS.contains(events._mousePos)) diff --git a/engines/xeen/xeen.cpp b/engines/xeen/xeen.cpp index b7b87af103..1c5fe4ac9e 100644 --- a/engines/xeen/xeen.cpp +++ b/engines/xeen/xeen.cpp @@ -249,7 +249,7 @@ void XeenEngine::play() { void XeenEngine::gameLoop() { // Main game loop while (!shouldExit()) { - if (_loadSaveSlot >= 0) { + if (isLoadPending()) { // Load any pending savegame int saveSlot = _loadSaveSlot; _loadSaveSlot = -1; diff --git a/engines/xeen/xeen.h b/engines/xeen/xeen.h index c79b240388..90452ae5e3 100644 --- a/engines/xeen/xeen.h +++ b/engines/xeen/xeen.h @@ -211,6 +211,11 @@ public: bool shouldExit() const { return _gameMode != GMODE_NONE || shouldQuit(); } /** + * Returns true if a savegame load is pending + */ + bool isLoadPending() const { return _loadSaveSlot != -1; } + + /** * Load a savegame */ virtual Common::Error loadGameState(int slot); |