(iOS) Make settings changes take place even while the game is running.
This commit is contained in:
parent
9fadca2a54
commit
ac9b75a871
|
@ -21,6 +21,7 @@
|
|||
|
||||
+ (RetroArch_iOS*)get;
|
||||
- (void)runGame:(NSString*)path;
|
||||
- (void)refreshConfig;
|
||||
|
||||
- (IBAction)showSettings;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue