From fc508427b8fedba133832b669f473eadc1635b3b Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Mon, 26 Aug 2024 20:45:49 +0300 Subject: [PATCH] More workarounds for the UTI bugs --- Cocoa/Document.m | 11 +++++++++++ Cocoa/Info.plist | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Cocoa/Document.m b/Cocoa/Document.m index 1fad04e8e..5486ec53d 100644 --- a/Cocoa/Document.m +++ b/Cocoa/Document.m @@ -2785,4 +2785,15 @@ enum GBWindowResizeAction [self queueDebuggerCommand:sender.alternateTitle]; } ++ (NSArray *)readableTypes +{ + NSMutableSet *set = [NSMutableSet setWithArray:[super readableTypes]]; + for (NSString *type in @[@"gb", @"gbc", @"isx", @"gbs"]) { + [set addObject:(__bridge_transfer NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, + (__bridge CFStringRef)type, + NULL)]; + } + return [set allObjects]; +} + @end diff --git a/Cocoa/Info.plist b/Cocoa/Info.plist index c437485bc..920e667be 100644 --- a/Cocoa/Info.plist +++ b/Cocoa/Info.plist @@ -22,7 +22,8 @@ LSItemContentTypes com.github.liji32.sameboy.gb - public.gbrom + public.gbrom + com.retroarch.gb LSTypeIsPackage 0 @@ -43,6 +44,7 @@ LSItemContentTypes com.github.liji32.sameboy.gbc + com.retroarch.gbc LSTypeIsPackage 0