From 95260e6b833ef5c3473839f1cd958d7a7d59c98c Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Mon, 21 Jul 2014 04:34:53 +0200 Subject: [PATCH] (Apple) Remove apple_core --- apple/common/RetroArch_Apple.h | 1 - apple/common/main.m | 4 ---- apple/iOS/menu.m | 7 ++++++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apple/common/RetroArch_Apple.h b/apple/common/RetroArch_Apple.h index b28b047839..a90042c73a 100644 --- a/apple/common/RetroArch_Apple.h +++ b/apple/common/RetroArch_Apple.h @@ -40,7 +40,6 @@ #endif extern char** apple_argv; -extern char apple_core[PATH_MAX]; extern id apple_platform; diff --git a/apple/common/main.m b/apple/common/main.m index 05eb7f577b..5b5d6fce91 100644 --- a/apple/common/main.m +++ b/apple/common/main.m @@ -23,7 +23,6 @@ id apple_platform; #pragma mark EMULATION -char apple_core[PATH_MAX]; void apple_rarch_exited(void) { @@ -37,9 +36,6 @@ void apple_run_core(NSString* core, const char* file) int argc; [apple_platform loadingCore:core withFile:file]; - - if (core.UTF8String && core.UTF8String[0] != '\0') - strlcpy(apple_core, core.UTF8String, sizeof(apple_core)); if (file && core) { diff --git a/apple/iOS/menu.m b/apple/iOS/menu.m index 86465dc8a9..e875c7153d 100644 --- a/apple/iOS/menu.m +++ b/apple/iOS/menu.m @@ -559,7 +559,12 @@ static void RunActionSheet(const char* title, const struct string_list* items, U nil]]; [settings addObject:[RAMenuItemBasic itemWithDescription:BOXSTRING("Core") - action:^{ [weakSelf.navigationController pushViewController:[[RACoreSettingsMenu alloc] initWithCore:BOXSTRING(apple_core)] animated:YES]; }]]; + action:^{ + char config_name[PATH_MAX]; + fill_pathname_base(config_name, g_settings.libretro, sizeof(config_name)); + + [weakSelf.navigationController pushViewController:[[RACoreSettingsMenu alloc] initWithCore:BOXSTRING(config_name)] animated:YES]; + }]]; [settings addObject:[RAMenuItemBasic itemWithDescription:BOXSTRING("Core Options") action:^{ [weakSelf.navigationController pushViewController:[RACoreOptionsMenu new] animated:YES]; }]]; }