mirror of
https://github.com/libretro/RetroArch
synced 2025-04-15 23:42:30 +00:00
remove saving remapping, use the automated method instead
This commit is contained in:
parent
90850799b7
commit
66a8e08252
@ -638,18 +638,6 @@ static bool event_save_auto_state(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
static void event_init_remapping(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *path = settings->input.remapping_path;
|
||||
config_file_t *conf = config_file_new(path);
|
||||
|
||||
if (!settings->input.remap_binds_enable || !conf)
|
||||
return;
|
||||
|
||||
input_remapping_load_file(conf, path);
|
||||
}
|
||||
|
||||
/**
|
||||
* event_save_core_config:
|
||||
*
|
||||
@ -1146,12 +1134,6 @@ bool event_cmd_ctl(enum event_command cmd, void *data)
|
||||
case EVENT_CMD_CHEATS_APPLY:
|
||||
cheat_manager_apply_cheats();
|
||||
break;
|
||||
case EVENT_CMD_REMAPPING_DEINIT:
|
||||
break;
|
||||
case EVENT_CMD_REMAPPING_INIT:
|
||||
event_cmd_ctl(EVENT_CMD_REMAPPING_DEINIT, NULL);
|
||||
event_init_remapping();
|
||||
break;
|
||||
case EVENT_CMD_REWIND_DEINIT:
|
||||
#ifdef HAVE_NETPLAY
|
||||
if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL))
|
||||
|
@ -201,8 +201,6 @@ enum event_command
|
||||
/* Toggles fullscreen mode. */
|
||||
EVENT_CMD_FULLSCREEN_TOGGLE,
|
||||
EVENT_CMD_PERFCNT_REPORT_FRONTEND_LOG,
|
||||
EVENT_CMD_REMAPPING_INIT,
|
||||
EVENT_CMD_REMAPPING_DEINIT,
|
||||
EVENT_CMD_VOLUME_UP,
|
||||
EVENT_CMD_VOLUME_DOWN,
|
||||
EVENT_CMD_EXEC
|
||||
|
@ -2165,7 +2165,6 @@ bool config_load_remap(void)
|
||||
else
|
||||
{
|
||||
RARCH_LOG("Remaps: no game-specific remap found at %s\n", game_path);
|
||||
*settings->input.remapping_path= '\0';
|
||||
input_remapping_set_defaults();
|
||||
}
|
||||
|
||||
@ -2185,7 +2184,6 @@ bool config_load_remap(void)
|
||||
else
|
||||
{
|
||||
RARCH_LOG("Remaps: no core-specific remap found at %s\n", core_path);
|
||||
*settings->input.remapping_path= '\0';
|
||||
input_remapping_set_defaults();
|
||||
}
|
||||
|
||||
|
@ -256,8 +256,6 @@ typedef struct settings
|
||||
bool input_descriptor_label_show;
|
||||
bool input_descriptor_hide_unbound;
|
||||
|
||||
char remapping_path[PATH_MAX_LENGTH];
|
||||
|
||||
unsigned menu_toggle_gamepad_combo;
|
||||
bool back_as_menu_toggle_enable;
|
||||
|
||||
|
@ -39,8 +39,8 @@ bool input_remapping_load_file(void *data, const char *path)
|
||||
if (!conf || string_is_empty(path))
|
||||
return false;
|
||||
|
||||
strlcpy(settings->input.remapping_path, path,
|
||||
sizeof(settings->input.remapping_path));
|
||||
strlcpy(global->name.remapfile, path,
|
||||
sizeof(global->name.remapfile));
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
|
@ -68,12 +68,12 @@ static void menu_action_setting_disp_set_label_remap_file_load(
|
||||
const char *path,
|
||||
char *s2, size_t len2)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
*w = 19;
|
||||
strlcpy(s2, path, len2);
|
||||
if (settings)
|
||||
fill_pathname_base(s, settings->input.remapping_path,
|
||||
if (global)
|
||||
fill_pathname_base(s, global->name.remapfile,
|
||||
len);
|
||||
}
|
||||
|
||||
|
@ -42,12 +42,12 @@
|
||||
|
||||
static int action_start_remap_file_load(unsigned type, const char *label)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
if (!settings)
|
||||
if (!global)
|
||||
return -1;
|
||||
|
||||
settings->input.remapping_path[0] = '\0';
|
||||
global->name.remapfile[0] = '\0';
|
||||
input_remapping_set_defaults();
|
||||
return 0;
|
||||
}
|
||||
|
@ -1262,7 +1262,6 @@ static int rarch_main_init(int argc, char *argv[])
|
||||
event_cmd_ctl(EVENT_CMD_CONTROLLERS_INIT, NULL);
|
||||
event_cmd_ctl(EVENT_CMD_RECORD_INIT, NULL);
|
||||
event_cmd_ctl(EVENT_CMD_CHEATS_INIT, NULL);
|
||||
event_cmd_ctl(EVENT_CMD_REMAPPING_INIT, NULL);
|
||||
event_cmd_ctl(EVENT_CMD_SAVEFILES_INIT, NULL);
|
||||
event_cmd_ctl(EVENT_CMD_SET_PER_GAME_RESOLUTION, NULL);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user