Skip to content

Commit

Permalink
(Load Core) OSX - Filter by dylibs
Browse files Browse the repository at this point in the history
  • Loading branch information
neville committed Jan 17, 2016
1 parent a4eae00 commit f44e0db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/drivers/ui_cocoa.m
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,8 @@ - (IBAction)openCore:(id)sender {
NSOpenPanel* panel = (NSOpenPanel*)[NSOpenPanel openPanel];
settings_t *settings = config_get_ptr();
NSString *startdir = BOXSTRING(settings->libretro_directory);
NSArray *filetypes = [[NSArray alloc] initWithObjects:BOXSTRING("dylib"), BOXSTRING("Core"), nil];
[panel setAllowedFileTypes:filetypes];
#if defined(MAC_OS_X_VERSION_10_6)
[panel setMessage:BOXSTRING("Load Core")];
[panel setDirectoryURL:[NSURL fileURLWithPath:startdir]];
Expand All @@ -366,7 +368,7 @@ - (IBAction)openCore:(id)sender {
[panel setCanChooseFiles:YES];
[panel setAllowsMultipleSelection:NO];
[panel setTreatsFilePackagesAsDirectories:NO];
NSInteger result = [panel runModalForTypes:[NSArray arrayWithObject:BOXSTRING("dylib")]];
NSInteger result = [panel runModal];
if (result == 1)
open_core_handler(panel, result);
#endif
Expand Down

0 comments on commit f44e0db

Please sign in to comment.