mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +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 "../config.def.h"
|
||||||
#include "menu/rmenu.h"
|
#include "menu/rmenu.h"
|
||||||
|
|
||||||
char input_path[1024];
|
|
||||||
|
|
||||||
#if defined(__CELLOS_LV2__)
|
#if defined(__CELLOS_LV2__)
|
||||||
#include "platform/platform_ps3_exec.c"
|
#include "platform/platform_ps3_exec.c"
|
||||||
#include "platform/platform_ps3.c"
|
#include "platform/platform_ps3.c"
|
||||||
@ -126,8 +124,8 @@ int rarch_main(int argc, char *argv[])
|
|||||||
char core_name[64];
|
char core_name[64];
|
||||||
|
|
||||||
libretro_get_current_core_pathname(core_name, sizeof(core_name));
|
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);
|
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(input_path);
|
config_read_keybinds(g_extern.input_config_path);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
menu_init();
|
menu_init();
|
||||||
@ -192,7 +190,7 @@ int rarch_main(int argc, char *argv[])
|
|||||||
|
|
||||||
#ifdef GEKKO
|
#ifdef GEKKO
|
||||||
/* Per-core input config saving */
|
/* Per-core input config saving */
|
||||||
config_save_keybinds(input_path);
|
config_save_keybinds(g_extern.input_config_path);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (g_extern.main_is_init)
|
if (g_extern.main_is_init)
|
||||||
|
@ -538,7 +538,7 @@ static int select_file(void *data, uint64_t input)
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case INPUT_PRESET_CHOICE:
|
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);
|
config_read_keybinds(path);
|
||||||
break;
|
break;
|
||||||
case BORDER_CHOICE:
|
case BORDER_CHOICE:
|
||||||
@ -1979,8 +1979,8 @@ static int select_setting(void *data, uint64_t input)
|
|||||||
break;
|
break;
|
||||||
case SETTING_CONTROLS_SCHEME:
|
case SETTING_CONTROLS_SCHEME:
|
||||||
strlcpy(text, "Control Scheme Preset", sizeof(text));
|
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);
|
snprintf(comment, sizeof(comment), "INFO - Input scheme preset [%s] is selected.", g_extern.input_config_path);
|
||||||
strlcpy(setting_text, g_extern.file_state.input_cfg_path, sizeof(setting_text));
|
strlcpy(setting_text, g_extern.input_config_path, sizeof(setting_text));
|
||||||
break;
|
break;
|
||||||
case SETTING_CONTROLS_NUMBER:
|
case SETTING_CONTROLS_NUMBER:
|
||||||
strlcpy(text, "Player", sizeof(text));
|
strlcpy(text, "Player", sizeof(text));
|
||||||
|
@ -325,6 +325,7 @@ struct global
|
|||||||
#endif
|
#endif
|
||||||
char config_path[PATH_MAX];
|
char config_path[PATH_MAX];
|
||||||
char append_config_path[PATH_MAX];
|
char append_config_path[PATH_MAX];
|
||||||
|
char input_config_path[PATH_MAX];
|
||||||
|
|
||||||
#ifdef HAVE_FILE_LOGGER
|
#ifdef HAVE_FILE_LOGGER
|
||||||
char default_log_file[PATH_MAX];
|
char default_log_file[PATH_MAX];
|
||||||
@ -576,10 +577,6 @@ struct global
|
|||||||
uint64_t lifecycle_state;
|
uint64_t lifecycle_state;
|
||||||
uint64_t lifecycle_mode_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.
|
// If this is non-NULL. RARCH_LOG and friends will write to this file.
|
||||||
FILE *log_file;
|
FILE *log_file;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user