mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +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);
|
NSString *startdir = BOXSTRING(settings->libretro_directory);
|
||||||
[panel setMessage:BOXSTRING("Load Core")];
|
[panel setMessage:BOXSTRING("Load Core")];
|
||||||
[panel setDirectoryURL:[NSURL fileURLWithPath:startdir]];
|
[panel setDirectoryURL:[NSURL fileURLWithPath:startdir]];
|
||||||
[panel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result)
|
[panel beginWithCompletionHandler:^(NSInteger result)
|
||||||
{
|
{
|
||||||
[[NSApplication sharedApplication] stopModal];
|
|
||||||
|
|
||||||
switch (result)
|
switch (result)
|
||||||
{
|
{
|
||||||
case NSOKButton:
|
case NSOKButton:
|
||||||
@ -332,8 +330,8 @@ extern void action_ok_push_quick_menu(void);
|
|||||||
}];
|
}];
|
||||||
#else
|
#else
|
||||||
[panel beginSheetForDirectory:nil file:nil modalForWindopw:[self window] modalDelegate:self didEndSelector:@selector(didEndSaveSheet:returnCode:contextInfo:) contextInfo:NULL];
|
[panel beginSheetForDirectory:nil file:nil modalForWindopw:[self window] modalDelegate:self didEndSelector:@selector(didEndSaveSheet:returnCode:contextInfo:) contextInfo:NULL];
|
||||||
#endif
|
|
||||||
[[NSApplication sharedApplication] runModalForWindow:panel];
|
[[NSApplication sharedApplication] runModalForWindow:panel];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)openDocument:(id)sender
|
- (void)openDocument:(id)sender
|
||||||
@ -346,10 +344,8 @@ extern void action_ok_push_quick_menu(void);
|
|||||||
startdir = BOXSTRING("/");
|
startdir = BOXSTRING("/");
|
||||||
[panel setDirectoryURL:[NSURL fileURLWithPath:startdir]];
|
[panel setDirectoryURL:[NSURL fileURLWithPath:startdir]];
|
||||||
[panel setMessage:BOXSTRING("Load Content")];
|
[panel setMessage:BOXSTRING("Load Content")];
|
||||||
[panel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result)
|
[panel beginWithCompletionHandler:^(NSInteger result)
|
||||||
{
|
{
|
||||||
[[NSApplication sharedApplication] stopModal];
|
|
||||||
|
|
||||||
switch (result)
|
switch (result)
|
||||||
{
|
{
|
||||||
case NSOKButton:
|
case NSOKButton:
|
||||||
@ -377,8 +373,8 @@ extern void action_ok_push_quick_menu(void);
|
|||||||
}];
|
}];
|
||||||
#else
|
#else
|
||||||
[panel beginSheetForDirectory:nil file:nil modalForWindopw:[self window] modalDelegate:self didEndSelector:@selector(didEndSaveSheet:returnCode:contextInfo:) contextInfo:NULL];
|
[panel beginSheetForDirectory:nil file:nil modalForWindopw:[self window] modalDelegate:self didEndSelector:@selector(didEndSaveSheet:returnCode:contextInfo:) contextInfo:NULL];
|
||||||
#endif
|
|
||||||
[[NSApplication sharedApplication] runModalForWindow:panel];
|
[[NSApplication sharedApplication] runModalForWindow:panel];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)unloadingCore
|
- (void)unloadingCore
|
||||||
|
Loading…
x
Reference in New Issue
Block a user