mirror of
https://github.com/libretro/RetroArch
synced 2025-02-04 03:40:03 +00:00
(iOS) Add Global Configuration Enable option - will use one common
shared config instead of making a new config file per selected core
This commit is contained in:
parent
66c8eb525a
commit
d51ea3bf2a
@ -42,6 +42,7 @@
|
||||
static ios_input_data_t g_input_data;
|
||||
|
||||
static bool enable_btstack;
|
||||
static bool enable_global_config;
|
||||
static bool use_icade;
|
||||
static uint32_t icade_buttons;
|
||||
|
||||
@ -370,7 +371,13 @@ static void event_reload_config(void* userdata)
|
||||
load_data->rom_path = strdup(path.UTF8String);
|
||||
load_data->sram_path = strdup(self.systemDirectory.UTF8String);
|
||||
load_data->state_path = strdup(self.systemDirectory.UTF8String);
|
||||
load_data->config_path = strdup(_module.configPath.UTF8String);
|
||||
if (enable_global_config)
|
||||
{
|
||||
NSString *str = [NSString stringWithFormat:@"%@/retroarch.cfg", [RetroArch_iOS get].systemDirectory];
|
||||
load_data->config_path = [str UTF8String];
|
||||
}
|
||||
else
|
||||
load_data->config_path = strdup(_module.configPath.UTF8String);
|
||||
load_data->verbose = false;
|
||||
|
||||
if (pthread_create(&_retroThread, 0, rarch_main_ios, load_data))
|
||||
@ -442,6 +449,7 @@ static void event_reload_config(void* userdata)
|
||||
//
|
||||
config_get_bool(conf, "ios_use_icade", &use_icade);
|
||||
config_get_bool(conf, "ios_use_btstack", &enable_btstack);
|
||||
config_get_bool(conf, "global_config_enable", &enable_btstack);
|
||||
|
||||
if (enable_btstack)
|
||||
[self startBluetooth];
|
||||
|
@ -290,6 +290,7 @@ static RASettingData* custom_action(NSString* action, id data)
|
||||
NSArray* settings = [NSArray arrayWithObjects:
|
||||
[NSArray arrayWithObjects:@"Frontend",
|
||||
custom_action(@"Diagnostic Log", nil),
|
||||
boolean_setting(config, @"global_config_enable", @"Use Global Configuration", @"false"),
|
||||
nil],
|
||||
[NSArray arrayWithObjects:@"Bluetooth",
|
||||
// TODO: Note that with this turned off the native bluetooth is expected to be a real keyboard
|
||||
|
Loading…
x
Reference in New Issue
Block a user