[Scummvm-git-logs] scummvm master -> 4e5cff608217fb7fcd91d6d464796f755f5a7a6b

dwatteau noreply at scummvm.org
Sat Oct 4 13:08:32 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:
4e5cff6082 MACOS: Fix building openFromBundle() on earlier macOS releases


Commit: 4e5cff608217fb7fcd91d6d464796f755f5a7a6b
    https://github.com/scummvm/scummvm/commit/4e5cff608217fb7fcd91d6d464796f755f5a7a6b
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-10-04T15:05:57+02:00

Commit Message:
MACOS: Fix building openFromBundle() on earlier macOS releases

Use an older syntax for iterating over objects, so that it can be built
on Tiger.

Changed paths:
    backends/platform/sdl/macosx/appmenu_osx.mm


diff --git a/backends/platform/sdl/macosx/appmenu_osx.mm b/backends/platform/sdl/macosx/appmenu_osx.mm
index 9e4d02c46c9..df0b96d3470 100644
--- a/backends/platform/sdl/macosx/appmenu_osx.mm
+++ b/backends/platform/sdl/macosx/appmenu_osx.mm
@@ -76,7 +76,11 @@ enum {
 
 static void openFromBundle(NSString *file, NSString *subdir = nil) {
 	NSString *path = nil;
-	for (NSString *type in @[@"rtf", @"html", @"txt", @"", @"md"]) {
+	NSArray *types = [NSArray arrayWithObjects:@"rtf", @"html", @"txt", @"", @"md", nil];
+	NSEnumerator *typeEnum = [types objectEnumerator];
+	NSString *type;
+
+	while ((type = [typeEnum nextObject])) {
 		if (subdir)
 			path = [[NSBundle mainBundle] pathForResource:file ofType:type inDirectory:subdir];
 		else
@@ -203,6 +207,7 @@ static void openFromBundle(NSString *file, NSString *subdir = nil) {
 		NSArray *dirContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:bundlePath error:nil];
 		NSEnumerator *dirEnum = [dirContents objectEnumerator];
 		NSString *file;
+
 		while ((file = [dirEnum nextObject])) {
 			if ([file hasPrefix:@"ScummVM Manual"] && [file hasSuffix:@".pdf"]) {
 #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_15




More information about the Scummvm-git-logs mailing list