mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(OSX) use beginWithCompletionHandler - fixes 'OK' case
This commit is contained in:
parent
61987e8ba5
commit
8b1b14e818
@ -297,10 +297,8 @@ extern void action_ok_push_quick_menu(void);
|
||||
NSString *startdir = BOXSTRING(settings->libretro_directory);
|
||||
[panel setMessage:BOXSTRING("Load Core")];
|
||||
[panel setDirectoryURL:[NSURL fileURLWithPath:startdir]];
|
||||
[panel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result)
|
||||
[panel beginWithCompletionHandler:^(NSInteger result)
|
||||
{
|
||||
[[NSApplication sharedApplication] stopModal];
|
||||
|
||||
switch (result)
|
||||
{
|
||||
case NSOKButton:
|
||||
@ -332,8 +330,8 @@ extern void action_ok_push_quick_menu(void);
|
||||
}];
|
||||
#else
|
||||
[panel beginSheetForDirectory:nil file:nil modalForWindopw:[self window] modalDelegate:self didEndSelector:@selector(didEndSaveSheet:returnCode:contextInfo:) contextInfo:NULL];
|
||||
#endif
|
||||
[[NSApplication sharedApplication] runModalForWindow:panel];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)openDocument:(id)sender
|
||||
@ -346,10 +344,8 @@ extern void action_ok_push_quick_menu(void);
|
||||
startdir = BOXSTRING("/");
|
||||
[panel setDirectoryURL:[NSURL fileURLWithPath:startdir]];
|
||||
[panel setMessage:BOXSTRING("Load Content")];
|
||||
[panel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result)
|
||||
[panel beginWithCompletionHandler:^(NSInteger result)
|
||||
{
|
||||
[[NSApplication sharedApplication] stopModal];
|
||||
|
||||
switch (result)
|
||||
{
|
||||
case NSOKButton:
|
||||
@ -377,8 +373,8 @@ extern void action_ok_push_quick_menu(void);
|
||||
}];
|
||||
#else
|
||||
[panel beginSheetForDirectory:nil file:nil modalForWindopw:[self window] modalDelegate:self didEndSelector:@selector(didEndSaveSheet:returnCode:contextInfo:) contextInfo:NULL];
|
||||
#endif
|
||||
[[NSApplication sharedApplication] runModalForWindow:panel];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)unloadingCore
|
||||
|
Loading…
x
Reference in New Issue
Block a user