aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/xeen/interface.cpp2
-rw-r--r--engines/xeen/xeen.cpp2
-rw-r--r--engines/xeen/xeen.h5
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);