diff --git a/console/rarch_console_libretro_mgmt.c b/console/rarch_console_libretro_mgmt.c index 80976546f9..3bd261b9e7 100644 --- a/console/rarch_console_libretro_mgmt.c +++ b/console/rarch_console_libretro_mgmt.c @@ -23,7 +23,7 @@ #ifndef IS_SALAMANDER -static void rarch_console_name_from_id(char *name, size_t size) +void rarch_console_name_from_id(char *name, size_t size) { if (size == 0) return; diff --git a/console/rarch_console_libretro_mgmt.h b/console/rarch_console_libretro_mgmt.h index 6a452a23fa..108a9b751c 100644 --- a/console/rarch_console_libretro_mgmt.h +++ b/console/rarch_console_libretro_mgmt.h @@ -27,6 +27,8 @@ enum #endif }; +void rarch_console_name_from_id(char *name, size_t size); + //We need to set libretro to the first entry in the cores //directory so that it will be saved to the config file void rarch_manage_libretro_set_first_file(char *first_file, size_t size_of_first_file, const char *libretro_path, const char * exe_ext); diff --git a/gx/frontend/main.c b/gx/frontend/main.c index 22b444b277..85e3472bc1 100644 --- a/gx/frontend/main.c +++ b/gx/frontend/main.c @@ -382,6 +382,13 @@ int main(void) rarch_settings_set_default(&input_gx); rarch_config_load(default_paths.config_file, path_prefix, extension, find_libretro_file); + + char core_name[64]; + rarch_console_name_from_id(core_name, sizeof(core_name)); + char input_path[1024]; + snprintf(input_path, sizeof(input_path), "%s/%s.cfg", default_paths.input_presets_dir, core_name); + config_read_keybinds(input_path); + init_libretro_sym(); input_gx.post_init(); @@ -436,6 +443,7 @@ begin_shutdown: if(g_console.return_to_launcher) rarch_console_exec(g_console.launch_app_on_exit); + config_save_keybinds(input_path); return 1; }