[Scummvm-git-logs] scummvm master -> 2550ea16dacb1badb8f5b8cd6e314737dbc1b4fc

dreammaster noreply at scummvm.org
Thu Oct 23 08:51:56 UTC 2025


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

Summary:
2550ea16da BAGEL: METAGAME: Fix showing save dialog when returning to main menu


Commit: 2550ea16dacb1badb8f5b8cd6e314737dbc1b4fc
    https://github.com/scummvm/scummvm/commit/2550ea16dacb1badb8f5b8cd6e314737dbc1b4fc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-10-23T01:51:48-07:00

Commit Message:
BAGEL: METAGAME: Fix showing save dialog when returning to main menu

Changed paths:
    engines/bagel/hodjnpodj/metagame/gtl/optdlg.cpp


diff --git a/engines/bagel/hodjnpodj/metagame/gtl/optdlg.cpp b/engines/bagel/hodjnpodj/metagame/gtl/optdlg.cpp
index a9ab33c9797..f1c22e7c19a 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/optdlg.cpp
+++ b/engines/bagel/hodjnpodj/metagame/gtl/optdlg.cpp
@@ -35,6 +35,8 @@ namespace HodjNPodj {
 namespace Metagame {
 namespace Gtl {
 
+#define IDC_LEAVE_SAVE		1099
+
 extern HWND     ghwndParent;
 
 /*****************************************************************
@@ -119,21 +121,32 @@ bool CMetaOptDlg::OnCommand(WPARAM wParam, LPARAM lParam) {
 		case IDC_LEAVE_GAME:
 			if (m_pBfcMgr->m_bChanged) {
 				C2ButtonDialog dlg2Button(this, m_pPalette, "&Yes", "&No", "Would you like to", "save this game", "before leaving?");
-				if (dlg2Button.DoModal() == CBUTTON1)
-					Saves::SaveGame((CWnd *)this, m_pPalette, nullptr);
+				if (dlg2Button.DoModal() == CBUTTON1) {
+					PostMessage(WM_COMMAND, IDC_LEAVE_SAVE);
+					return true;
+				}
 			}
 			ClearDialogImage();
 			EndDialog(1);
 			return true;
 
-		case IDC_OPTIONS: {
+		case IDC_LEAVE_SAVE:
+			UpdateWindow();
+			Saves::SaveGame((CWnd *)this, m_pPalette, nullptr);
+			ClearDialogImage();
+			EndDialog(1);
+			return true;
+
+		case IDC_OPTIONS:
+		{
 			CAudioCfgDlg dlgAudioCfg(this, m_pPalette, IDD_AUDIOCFG);
 			m_bMusic = GetPrivateProfileInt("Meta", "Music", true, "HODJPODJ.INI");
 			m_bSoundFX = GetPrivateProfileInt("Meta", "SoundEffects", true, "HODJPODJ.INI");
 		}
 		return true;
 
-		case IDC_RULES: {
+		case IDC_RULES:
+		{
 			CRules RulesDlg(this, "metarule.txt", m_pPalette, nullptr);
 			RulesDlg.DoModal();
 			return true;
@@ -146,8 +159,12 @@ bool CMetaOptDlg::OnCommand(WPARAM wParam, LPARAM lParam) {
 			ClearDialogImage();
 			EndDialog(0);
 			return true;
+
+		default:
+			break;
 		}
 	}
+
 	return CBmpDialog::OnCommand(wParam, lParam);
 }
 




More information about the Scummvm-git-logs mailing list