[Scummvm-git-logs] scummvm master -> d94ba47dbeefd67b2bef324cc8466696e8526bb4

bluegr noreply at scummvm.org
Sun Jul 10 20:18:25 UTC 2022


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:
d94ba47dbe CHEWY: Fix cancelling load from the main menu - bug #13682


Commit: d94ba47dbeefd67b2bef324cc8466696e8526bb4
    https://github.com/scummvm/scummvm/commit/d94ba47dbeefd67b2bef324cc8466696e8526bb4
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-10T23:18:04+03:00

Commit Message:
CHEWY: Fix cancelling load from the main menu - bug #13682

Changed paths:
    engines/chewy/dialogs/files.cpp
    engines/chewy/main.cpp


diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 799d53bec20..bdef495442f 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -38,7 +38,7 @@ enum Widget {
 	GAME = 4, QUIT = 5, OPTIONS = 6, W7 = 7, W8 = 8
 };
 
-
+// Returns true if the game should exit to main menu
 bool Files::execute(bool isInGame) {
 	int16 key = 0;
 	Common::Point pt[8];
@@ -51,7 +51,8 @@ bool Files::execute(bool isInGame) {
 		g_engine->showGmm(isInGame);
 		_G(flags).mainMouseFlag = false;
 		_G(minfo).button = 0;
-		return 0;
+		const int16 roomNum = _G(gameState)._personRoomNr[P_CHEWY];
+		return isInGame ? false : (roomNum == 98);
 	}
 
 	TafInfo *ti = _G(mem)->taf_adr(OPTION_TAF);
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index e8f1f3951da..ea9f34da8e9 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -273,7 +273,7 @@ bool mainLoop(int16 mode) {
 				invent_2_slot(_G(cur)->getInventoryCursor());
 			_G(cur)->setInventoryCursor(-1);
 			cursorChoice(CUR_SAVE);
-			if (Dialogs::Files::execute(true) == 1) {
+			if (Dialogs::Files::execute(true)) {
 				retValue = true;
 				_G(fx_blend) = BLEND4;
 			}




More information about the Scummvm-git-logs mailing list