diff --git a/ios/RetroArch/RetroArch_iOS.h b/ios/RetroArch/RetroArch_iOS.h index aa026b7011..08bae16b3d 100644 --- a/ios/RetroArch/RetroArch_iOS.h +++ b/ios/RetroArch/RetroArch_iOS.h @@ -21,6 +21,7 @@ + (RetroArch_iOS*)get; - (void)runGame:(NSString*)path; +- (void)refreshConfig; - (IBAction)showSettings; diff --git a/ios/RetroArch/RetroArch_iOS.m b/ios/RetroArch/RetroArch_iOS.m index f54967c61a..7e9040d922 100644 --- a/ios/RetroArch/RetroArch_iOS.m +++ b/ios/RetroArch/RetroArch_iOS.m @@ -159,6 +159,20 @@ } } +- (void)refreshConfig +{ + // Need to clear these otherwise stale versions may be used! + memset(g_settings.input.overlay, 0, sizeof(g_settings.input.overlay)); + memset(g_settings.video.bsnes_shader_path, 0, sizeof(g_settings.video.bsnes_shader_path)); + + if (_isRunning) + { + uninit_drivers(); + config_load(); + init_drivers(); + } +} + - (void)iterate { if (_isPaused || !_isRunning || !_isGameTop) @@ -236,7 +250,7 @@ [self pushViewController:[RASettingsList new] animated:YES]; } -#pragma MARK Bluetooth Helpers +#pragma mark Bluetooth Helpers - (UIBarButtonItem*)createBluetoothButton { #ifdef WIIMOTE diff --git a/ios/RetroArch/settings/RASettingsList.m b/ios/RetroArch/settings/RASettingsList.m index 7cf9e3ff15..5eda933dda 100644 --- a/ios/RetroArch/settings/RASettingsList.m +++ b/ios/RetroArch/settings/RASettingsList.m @@ -170,6 +170,7 @@ static RASettingData* custom_action(NSString* action) RAConfig* config = [[RAConfig alloc] initWithPath:[RetroArch_iOS get].moduleInfo.configPath]; [self writeSettings:nil toConfig:config]; [config writeToFile:[RetroArch_iOS get].moduleInfo.configPath]; + [[RetroArch_iOS get] refreshConfig]; } - (void)handleCustomAction:(NSString*)action