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

dreammaster noreply at scummvm.org
Sat Sep 27 06:15:50 UTC 2025


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

Summary:
ba29de426d BAGEL: METAGAME: Fix memory overrun adusting grand tour scores table
bb27a464ba BAGEL: MFC: Implement GetTextExtent function


Commit: ba29de426dadecc4437577740ff538905d572504
    https://github.com/scummvm/scummvm/commit/ba29de426dadecc4437577740ff538905d572504
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-09-26T23:01:54-07:00

Commit Message:
BAGEL: METAGAME: Fix memory overrun adusting grand tour scores table

Changed paths:
    engines/bagel/hodjnpodj/metagame/grand_tour/grand_tour.cpp


diff --git a/engines/bagel/hodjnpodj/metagame/grand_tour/grand_tour.cpp b/engines/bagel/hodjnpodj/metagame/grand_tour/grand_tour.cpp
index 611239c14cf..739ff4e2c9d 100644
--- a/engines/bagel/hodjnpodj/metagame/grand_tour/grand_tour.cpp
+++ b/engines/bagel/hodjnpodj/metagame/grand_tour/grand_tour.cpp
@@ -286,7 +286,7 @@ CMainGTWindow::CMainGTWindow(HWND hCallingWnd, LPGRANDTRSTRUCT  pgtGrandTourStru
 				int j;
 
 				nNewRank = i;
-				for (j = 10; j > i; j--) {
+				for (j = 9; j > i; j--) {
 					Common::strcpy_s(astTopTenScores[j].acName, astTopTenScores[j - 1].acName);
 					astTopTenScores[j].nScore = astTopTenScores[j - 1].nScore;
 					astTopTenScores[j].nSkillLevel = astTopTenScores[j - 1].nSkillLevel;


Commit: bb27a464ba963c92bba2b5580721201b856162de
    https://github.com/scummvm/scummvm/commit/bb27a464ba963c92bba2b5580721201b856162de
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-09-26T23:15:41-07:00

Commit Message:
BAGEL: MFC: Implement GetTextExtent function

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


diff --git a/engines/bagel/mfc/wingdi.cpp b/engines/bagel/mfc/wingdi.cpp
index edf7067a2a9..8aaaa9c34ed 100644
--- a/engines/bagel/mfc/wingdi.cpp
+++ b/engines/bagel/mfc/wingdi.cpp
@@ -275,7 +275,9 @@ int StretchDIBits(HDC hdc, int xDest, int yDest, int DestWidth, int DestHeight,
 }
 
 int GetTextExtent(HDC hdc, const char *text, size_t len) {
-	error("TODO: GetTextExtent");
+	CDC *dc = CDC::FromHandle(hdc);
+	CSize size = dc->GetTextExtent(CString(text, len));
+	return size.cx;
 }
 
 bool GetTextMetrics(HDC hdc, LPTEXTMETRIC lptm) {




More information about the Scummvm-git-logs mailing list