[Scummvm-git-logs] scummvm master -> 378be513fa3a2bbe590bae3f4c629009ae13717e

dreammaster noreply at scummvm.org
Sun Sep 7 07:08:01 UTC 2025


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

Summary:
0f998d64f6 BAGEL: MINIGAMES: Remove manual update of Poker hold buttons
03b4809a72 BAGEL: MFC: Hack to redraw child controls after window paint
378be513fa BAGEL: MINIGAMES: Better fix for redrawing Poker Hold buttons


Commit: 0f998d64f6b3b6a4e056bb8a8a0127ea6d97d4b5
    https://github.com/scummvm/scummvm/commit/0f998d64f6b3b6a4e056bb8a8a0127ea6d97d4b5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-09-07T00:07:51-07:00

Commit Message:
BAGEL: MINIGAMES: Remove manual update of Poker hold buttons

Changed paths:
    engines/bagel/hodjnpodj/poker/poker.cpp


diff --git a/engines/bagel/hodjnpodj/poker/poker.cpp b/engines/bagel/hodjnpodj/poker/poker.cpp
index 09539c35cc5..7493a9bef23 100644
--- a/engines/bagel/hodjnpodj/poker/poker.cpp
+++ b/engines/bagel/hodjnpodj/poker/poker.cpp
@@ -1895,9 +1895,6 @@ void CMainPokerWindow::SetHoldList(int nIndex) {
 	bTestLoadBmp = apHold[nIndex]->LoadBitmaps(pGamePalette, pUpBmp, pDnBmp, nullptr, pDsBmp);
 	ASSERT(bTestLoadBmp);                 // test for button's bitmap loading
 
-	apHold[nIndex]->Invalidate();
-	apHold[nIndex]->UpdateWindow();
-
 	pUpBmp = nullptr;
 	pDnBmp = nullptr;
 	pDsBmp = nullptr;


Commit: 03b4809a72719e62cad271f4ce00b36f15eb8df2
    https://github.com/scummvm/scummvm/commit/03b4809a72719e62cad271f4ce00b36f15eb8df2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-09-07T00:07:51-07:00

Commit Message:
BAGEL: MFC: Hack to redraw child controls after window paint

This works around issue that drawing a window shouldn't draw
in any area covered by any child control. It may result in
some redundant extra drawings, but at least the controls
will be properly visible.

If we ever want to properly fix it, we'd ideally have to
emulate a proper hierarchy of separate window surfaces, and
any drawing to one will only copy the sections that are
properly visible to the screen. In fact, it'd probably
be a mandatory requirement if we want to support multiple
windows on-screen at the same time, since the windows could
be independantly drawing their contents, and windows could
partially overlap.

Changed paths:
    engines/bagel/mfc/wnd.cpp


diff --git a/engines/bagel/mfc/wnd.cpp b/engines/bagel/mfc/wnd.cpp
index ccd0bbbd273..23819e88b14 100644
--- a/engines/bagel/mfc/wnd.cpp
+++ b/engines/bagel/mfc/wnd.cpp
@@ -480,6 +480,18 @@ LRESULT CWnd::SendMessage(unsigned int message, WPARAM wParam, LPARAM lParam) {
 	if (!OnWndMsg(message, wParam, lParam, &lResult))
 		lResult = DefWindowProc(message, wParam, lParam);
 
+	// FIXME: In a properly emulated control painting,
+	// painting a window background should exclude drawing on
+	// any area covered by child controls. Technically each
+	// control has it's own window, unlike here in ScummVM,
+	// where all the DCs are sharing the single physical screen.
+	// As a hack to fix issues with controls getting drawn over,
+	// any paint to a wnd will redraw any child controls
+	if (message == WM_PAINT) {
+		for (auto &child : _children)
+			child._value->RedrawWindow(nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW);
+	}
+
 	// Handle messages that get sent to child controls
 	if (isRecursiveMessage(message)) {
 		for (auto &ctl : _children)


Commit: 378be513fa3a2bbe590bae3f4c629009ae13717e
    https://github.com/scummvm/scummvm/commit/378be513fa3a2bbe590bae3f4c629009ae13717e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-09-07T00:07:51-07:00

Commit Message:
BAGEL: MINIGAMES: Better fix for redrawing Poker Hold buttons

Changed paths:
    engines/bagel/hodjnpodj/hnplibs/button.cpp


diff --git a/engines/bagel/hodjnpodj/hnplibs/button.cpp b/engines/bagel/hodjnpodj/hnplibs/button.cpp
index 445f38eabfb..79447c3c5e3 100644
--- a/engines/bagel/hodjnpodj/hnplibs/button.cpp
+++ b/engines/bagel/hodjnpodj/hnplibs/button.cpp
@@ -553,6 +553,9 @@ void CBmpButton::ensureSize() {
 		m_pParentWnd->ScreenToClient(&clientRect);
 		MoveWindow(&clientRect);
 	}
+
+	// Flag for the control to redraw itself
+	Invalidate();
 }
 
 // CBmpButton message map:




More information about the Scummvm-git-logs mailing list