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

AndywinXp noreply at scummvm.org
Sun Nov 17 10:40:27 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:
a3ed463acc SCUMM: INDY3/LOOM (Mac): Force _macGui init to allow font resources loading


Commit: a3ed463acce4a90504c5e1dfce9ae80f29baa7fd
    https://github.com/scummvm/scummvm/commit/a3ed463acce4a90504c5e1dfce9ae80f29baa7fd
Author: AndywinXp (andywinxp at gmail.com)
Date: 2024-11-17T11:40:23+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