mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 18:40:49 +00:00
(GX) save input binds (per core)
This commit is contained in:
parent
14af5ca589
commit
dc0b44d2f3
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#ifndef IS_SALAMANDER
|
#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)
|
if (size == 0)
|
||||||
return;
|
return;
|
||||||
|
@ -27,6 +27,8 @@ enum
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void rarch_console_name_from_id(char *name, size_t size);
|
||||||
|
|
||||||
//We need to set libretro to the first entry in the cores
|
//We need to set libretro to the first entry in the cores
|
||||||
//directory so that it will be saved to the config file
|
//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);
|
void rarch_manage_libretro_set_first_file(char *first_file, size_t size_of_first_file, const char *libretro_path, const char * exe_ext);
|
||||||
|
@ -382,6 +382,13 @@ int main(void)
|
|||||||
|
|
||||||
rarch_settings_set_default(&input_gx);
|
rarch_settings_set_default(&input_gx);
|
||||||
rarch_config_load(default_paths.config_file, path_prefix, extension, find_libretro_file);
|
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();
|
init_libretro_sym();
|
||||||
|
|
||||||
input_gx.post_init();
|
input_gx.post_init();
|
||||||
@ -436,6 +443,7 @@ begin_shutdown:
|
|||||||
|
|
||||||
if(g_console.return_to_launcher)
|
if(g_console.return_to_launcher)
|
||||||
rarch_console_exec(g_console.launch_app_on_exit);
|
rarch_console_exec(g_console.launch_app_on_exit);
|
||||||
|
config_save_keybinds(input_path);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user