[Scummvm-git-logs] scummvm master -> 3b7fa3ee406ef6fbc1347602de0f43311c1aefd2
dreammaster
noreply at scummvm.org
Sat Sep 6 10:20:26 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:
3b7fa3ee40 BAGEL: MFC: Fix shutting down ScummVM from minigame options dialogs
Commit: 3b7fa3ee406ef6fbc1347602de0f43311c1aefd2
https://github.com/scummvm/scummvm/commit/3b7fa3ee406ef6fbc1347602de0f43311c1aefd2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-09-06T03:20:13-07:00
Commit Message:
BAGEL: MFC: Fix shutting down ScummVM from minigame options dialogs
Changed paths:
engines/bagel/mfc/libs/event_loop.cpp
diff --git a/engines/bagel/mfc/libs/event_loop.cpp b/engines/bagel/mfc/libs/event_loop.cpp
index 31f05037ed1..f21a4badada 100644
--- a/engines/bagel/mfc/libs/event_loop.cpp
+++ b/engines/bagel/mfc/libs/event_loop.cpp
@@ -382,23 +382,22 @@ void EventLoop::DispatchMessage(LPMSG lpMsg) {
void EventLoop::handleQuit() {
_quitFlag = QUIT_QUITTING;
- // For a shutdown, flag any open dialogs with
- // a modal result so they close, and a WM_CLOSE
- // to any non-dialogs
- auto wnds = GetActiveWindow()->GetSafeParents(true);
- for (auto wnd : wnds) {
+ // For a shutdown, go backwards through the windows,
+ // and flag any open dialogs with a modal result
+ // so they close, and a WM_CLOSE to any non-dialogs
+ for (int i = _activeWindows.size() - 1; i >= 0; --i) {
+ CWnd *wnd = _activeWindows[i];
CDialog *d = dynamic_cast<CDialog *>(wnd);
- MSG closeMsg;
- closeMsg.hwnd = wnd->m_hWnd;
if (d) {
d->_modalResult = -999;
- closeMsg.message = WM_NULL;
} else {
+ MSG closeMsg;
+ closeMsg.hwnd = wnd->m_hWnd;
closeMsg.message = WM_CLOSE;
- }
- _messages.push(closeMsg);
+ _messages.push(closeMsg);
+ }
}
}
More information about the Scummvm-git-logs
mailing list