From c1fa603a0f7fa2194f9125fbee113145b86c682e Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Mon, 21 Jul 2014 09:04:45 +0200 Subject: [PATCH] (iOS) Menu - cleanups --- apple/common/main.m | 2 -- apple/iOS/menu.m | 19 +++++++++---------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/apple/common/main.m b/apple/common/main.m index 05f05fa8f7..b1a9903292 100644 --- a/apple/common/main.m +++ b/apple/common/main.m @@ -22,8 +22,6 @@ id apple_platform; -#pragma mark EMULATION - void apple_rarch_exited(void) { [apple_platform unloadingCore]; diff --git a/apple/iOS/menu.m b/apple/iOS/menu.m index 2e805a6775..31e2e91b46 100644 --- a/apple/iOS/menu.m +++ b/apple/iOS/menu.m @@ -814,12 +814,12 @@ static void RunActionSheet(const char* title, const struct string_list* items, U { config_file_t* config = (config_file_t*)config_file_new(self.pathToSave.UTF8String); - if (!config) - config = config_file_new(0); - - setting_data_save_config(setting_data_get_list(), config); - config_file_write(config, self.pathToSave.UTF8String); - config_file_free(config); + if (config) + { + setting_data_save_config(setting_data_get_list(), config); + config_file_write(config, self.pathToSave.UTF8String); + config_file_free(config); + } } } @@ -827,10 +827,9 @@ static void RunActionSheet(const char* title, const struct string_list* items, U { if (self.isCustom && self.pathToSave) { - [[NSFileManager defaultManager] removeItemAtPath:self.pathToSave error:nil]; - self.pathToSave = false; - - [self.navigationController popViewControllerAnimated:YES]; + remove(self.pathToSave.UTF8String); + self.pathToSave = false; + [self.navigationController popViewControllerAnimated:YES]; } }