From 8b2ed76b36befede57571e17d1ddf5003981d733 Mon Sep 17 00:00:00 2001 From: meancoot Date: Fri, 14 Jun 2013 13:48:55 -0400 Subject: [PATCH] (iOS) Add ability to delete existing custom configurations --- ios/RetroArch/settings.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ios/RetroArch/settings.m b/ios/RetroArch/settings.m index 8bcca14fe8..e85fd18830 100644 --- a/ios/RetroArch/settings.m +++ b/ios/RetroArch/settings.m @@ -180,9 +180,12 @@ static RASettingData* custom_action(NSString* action, id data) NSString* overlay_path = [[[NSBundle mainBundle] bundlePath] stringByAppendingString:@"/overlays/"]; NSString* shader_path = [[[NSBundle mainBundle] bundlePath] stringByAppendingString:@"/shaders_glsl/"]; + RASettingData* deleteCustomAction = _module.hasCustomConfig ? custom_action(@"Delete Custom Config", nil) : nil; + NSArray* settings = [NSArray arrayWithObjects: [NSArray arrayWithObjects:@"Core", custom_action(@"Core Info", nil), + deleteCustomAction, nil], [NSArray arrayWithObjects:@"Video", @@ -292,6 +295,11 @@ static RASettingData* custom_action(NSString* action, id data) { if ([@"Core Info" isEqualToString:setting.label]) [[RetroArch_iOS get] pushViewController:[[RAModuleInfoList alloc] initWithModuleInfo:_module] animated:YES]; + else if([@"Delete Custom Config" isEqualToString:setting.label]) + { + [_module deleteCustomConfig]; + [self.navigationController popViewControllerAnimated:YES]; + } } @end