Skip to content

Commit

Permalink
More workarounds for the UTI bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
LIJI32 committed Aug 26, 2024
1 parent 430e42f commit fc50842
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Cocoa/Document.m
Original file line number Diff line number Diff line change
Expand Up @@ -2785,4 +2785,15 @@ - (IBAction)debuggerButtonPressed:(NSButton *)sender
[self queueDebuggerCommand:sender.alternateTitle];
}

+ (NSArray<NSString *> *)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
4 changes: 3 additions & 1 deletion Cocoa/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
<key>LSItemContentTypes</key>
<array>
<string>com.github.liji32.sameboy.gb</string>
<string>public.gbrom</string>
<string>public.gbrom</string>
<string>com.retroarch.gb</string>
</array>
<key>LSTypeIsPackage</key>
<integer>0</integer>
Expand All @@ -43,6 +44,7 @@
<key>LSItemContentTypes</key>
<array>
<string>com.github.liji32.sameboy.gbc</string>
<string>com.retroarch.gbc</string>
</array>
<key>LSTypeIsPackage</key>
<integer>0</integer>
Expand Down

0 comments on commit fc50842

Please sign in to comment.