From 5eab0ef2fbaa3d1b8f85c70bcf9d97ca2b97dcd0 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Mon, 21 Jul 2014 17:49:25 +0200 Subject: [PATCH] (OSX) File->Open / File->Recent now works with same core --- apple/OSX/platform.m | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/apple/OSX/platform.m b/apple/OSX/platform.m index 0b0d9334f1..b89ce46fea 100644 --- a/apple/OSX/platform.m +++ b/apple/OSX/platform.m @@ -19,6 +19,7 @@ #import "../common/RetroArch_Apple.h" #include "../../input/apple_input.h" +#include "../../frontend/menu/menu_common.h" #include "../../file.h" @@ -206,7 +207,15 @@ static char** waiting_argv; if (filenames.count == 1 && [filenames objectAtIndex:0]) { self.file = [filenames objectAtIndex:0]; - [self chooseCore]; + const char *core_name = driver.menu->info.library_name; + + if (core_name) + { + strlcpy(g_extern.fullpath, self.file.UTF8String, sizeof(g_extern.fullpath)); + load_menu_game_new_core(); + } + else + [self chooseCore]; [sender replyToOpenOrPrint:NSApplicationDelegateReplySuccess]; } @@ -229,6 +238,14 @@ static char** waiting_argv; { NSURL *url = (NSURL*)panel.URL; self.file = url.path; + const char *core_name = driver.menu->info.library_name; + + if (core_name) + { + strlcpy(g_extern.fullpath, self.file.UTF8String, sizeof(g_extern.fullpath)); + load_menu_game_new_core(); + } + else [self performSelector:@selector(chooseCore) withObject:nil afterDelay:.5f]; } }];