[Scummvm-git-logs] scummvm master -> 0a5dcfb83323a478bc89e641e7478740b252101a

dreammaster dreammaster at scummvm.org
Wed Mar 21 03:06:28 CET 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
0a5dcfb833 XEEN: Fix GMM savegame loads were waiting until a turn had passed


Commit: 0a5dcfb83323a478bc89e641e7478740b252101a
    https://github.com/scummvm/scummvm/commit/0a5dcfb83323a478bc89e641e7478740b252101a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-03-20T22:06:22-04:00

Commit Message:
XEEN: Fix GMM savegame loads were waiting until a turn had passed

Changed paths:
    engines/xeen/interface.cpp
    engines/xeen/xeen.cpp
    engines/xeen/xeen.h


diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp
index aa58f25..16497ec 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 b7b87af..1c5fe4a 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 c79b240..90452ae 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);





More information about the Scummvm-git-logs mailing list