[Scummvm-git-logs] scummvm branch-2-9 -> 28fd30fb844b2740aa00abc1b4b512b927cbb5f9

AndywinXp noreply at scummvm.org
Sun Nov 17 10:41:45 UTC 2024


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:
28fd30fb84 SCUMM: INDY3/LOOM (Mac): Force _macGui init to allow font resources loading


Commit: 28fd30fb844b2740aa00abc1b4b512b927cbb5f9
    https://github.com/scummvm/scummvm/commit/28fd30fb844b2740aa00abc1b4b512b927cbb5f9
Author: AndywinXp (andywinxp at gmail.com)
Date: 2024-11-17T11:41:37+01:00

Commit Message:
SCUMM: INDY3/LOOM (Mac): Force _macGui init to allow font resources loading

The reason why we are initializing the Mac GUI even without original GUI active
is because the engine will attempt to load Mac fonts from resources... using the
_macGui object. This is not optimal, ideally we would want to decouple resource
handling from the responsibilities of a simulated OS interface.

This will have to do for the 2.9.0 release, we can implement a better design later.

Changed paths:
    engines/scumm/scumm.cpp


diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 02ecd1f6979..19df7a7aa19 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1205,8 +1205,12 @@ Common::Error ScummEngine::init() {
 					macResourceFile = indyFileNames[i];
 
 					_textSurfaceMultiplier = 2;
-					if (isUsingOriginalGUI())
-						_macGui = new MacGui(this, macResourceFile);
+					// FIXME: THIS IS A TEMPORARY WORKAROUND!
+					// The reason why we are initializing the Mac GUI even without original GUI active
+					// is because the engine will attempt to load Mac fonts from resources... using the
+					// _macGui object. This is not optimal, ideally we would want to decouple resource
+					// handling from the responsibilities of a simulated OS interface.
+					_macGui = new MacGui(this, macResourceFile);
 					break;
 				}
 			}
@@ -1228,8 +1232,12 @@ Common::Error ScummEngine::init() {
 					macResourceFile = loomFileNames[i];
 
 					_textSurfaceMultiplier = 2;
-					if (isUsingOriginalGUI())
-						_macGui = new MacGui(this, macResourceFile);
+					// FIXME: THIS IS A TEMPORARY WORKAROUND!
+					// The reason why we are initializing the Mac GUI even without original GUI active
+					// is because the engine will attempt to load Mac fonts from resources... using the
+					// _macGui object. This is not optimal, ideally we would want to decouple resource
+					// handling from the responsibilities of a simulated OS interface.
+					_macGui = new MacGui(this, macResourceFile);
 					break;
 				}
 			}




More information about the Scummvm-git-logs mailing list