(GX/RMenu) Have per-core configuration use g_extern.input_config_path - have

RMenu use it as well
This commit is contained in:
twinaphex 2013-05-05 16:29:32 +02:00
parent 6a1eb0c0b1
commit 40ba6cf9e2
3 changed files with 7 additions and 12 deletions

View File

@ -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)

View File

@ -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));

View File

@ -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;