mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 16:39:43 +00:00
(GX/RMenu) Have per-core configuration use g_extern.input_config_path - have
RMenu use it as well
This commit is contained in:
parent
6a1eb0c0b1
commit
40ba6cf9e2
@ -22,8 +22,6 @@
|
||||
#include "../config.def.h"
|
||||
#include "menu/rmenu.h"
|
||||
|
||||
char input_path[1024];
|
||||
|
||||
#if defined(__CELLOS_LV2__)
|
||||
#include "platform/platform_ps3_exec.c"
|
||||
#include "platform/platform_ps3.c"
|
||||
@ -126,8 +124,8 @@ int rarch_main(int argc, char *argv[])
|
||||
char core_name[64];
|
||||
|
||||
libretro_get_current_core_pathname(core_name, sizeof(core_name));
|
||||
snprintf(input_path, sizeof(input_path), "%s/%s.cfg", default_paths.input_presets_dir, core_name);
|
||||
config_read_keybinds(input_path);
|
||||
snprintf(g_extern.input_config_path, sizeof(g_extern.input_config_path), "%s/%s.cfg", default_paths.input_presets_dir, core_name);
|
||||
config_read_keybinds(g_extern.input_config_path);
|
||||
#endif
|
||||
|
||||
menu_init();
|
||||
@ -192,7 +190,7 @@ int rarch_main(int argc, char *argv[])
|
||||
|
||||
#ifdef GEKKO
|
||||
/* Per-core input config saving */
|
||||
config_save_keybinds(input_path);
|
||||
config_save_keybinds(g_extern.input_config_path);
|
||||
#endif
|
||||
|
||||
if (g_extern.main_is_init)
|
||||
|
@ -538,7 +538,7 @@ static int select_file(void *data, uint64_t input)
|
||||
break;
|
||||
#endif
|
||||
case INPUT_PRESET_CHOICE:
|
||||
strlcpy(g_extern.file_state.input_cfg_path, path, sizeof(g_extern.file_state.input_cfg_path));
|
||||
strlcpy(g_extern.input_config_path, path, sizeof(g_extern.input_config_path));
|
||||
config_read_keybinds(path);
|
||||
break;
|
||||
case BORDER_CHOICE:
|
||||
@ -1979,8 +1979,8 @@ static int select_setting(void *data, uint64_t input)
|
||||
break;
|
||||
case SETTING_CONTROLS_SCHEME:
|
||||
strlcpy(text, "Control Scheme Preset", sizeof(text));
|
||||
snprintf(comment, sizeof(comment), "INFO - Input scheme preset [%s] is selected.", g_extern.file_state.input_cfg_path);
|
||||
strlcpy(setting_text, g_extern.file_state.input_cfg_path, sizeof(setting_text));
|
||||
snprintf(comment, sizeof(comment), "INFO - Input scheme preset [%s] is selected.", g_extern.input_config_path);
|
||||
strlcpy(setting_text, g_extern.input_config_path, sizeof(setting_text));
|
||||
break;
|
||||
case SETTING_CONTROLS_NUMBER:
|
||||
strlcpy(text, "Player", sizeof(text));
|
||||
|
@ -325,6 +325,7 @@ struct global
|
||||
#endif
|
||||
char config_path[PATH_MAX];
|
||||
char append_config_path[PATH_MAX];
|
||||
char input_config_path[PATH_MAX];
|
||||
|
||||
#ifdef HAVE_FILE_LOGGER
|
||||
char default_log_file[PATH_MAX];
|
||||
@ -576,10 +577,6 @@ struct global
|
||||
uint64_t lifecycle_state;
|
||||
uint64_t lifecycle_mode_state;
|
||||
|
||||
struct
|
||||
{
|
||||
char input_cfg_path[PATH_MAX];
|
||||
} file_state;
|
||||
|
||||
// If this is non-NULL. RARCH_LOG and friends will write to this file.
|
||||
FILE *log_file;
|
||||
|
Loading…
Reference in New Issue
Block a user