(OSX) use beginWithCompletionHandler - fixes 'OK' case

This commit is contained in:
Twinaphex 2016-01-13 19:06:27 +01:00
parent 61987e8ba5
commit 8b1b14e818

View File

@ -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