diff --git a/command_event.c b/command_event.c index 8130781982..f11926ed74 100644 --- a/command_event.c +++ b/command_event.c @@ -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)) diff --git a/command_event.h b/command_event.h index 8db27d32d1..0548d330d1 100644 --- a/command_event.h +++ b/command_event.h @@ -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 diff --git a/configuration.c b/configuration.c index b847cd026d..ae26ae8b65 100644 --- a/configuration.c +++ b/configuration.c @@ -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(); } diff --git a/configuration.h b/configuration.h index 82342d32ae..31f8a27f62 100644 --- a/configuration.h +++ b/configuration.h @@ -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; diff --git a/input/input_remapping.c b/input/input_remapping.c index a87917fbe1..61f800ae5b 100644 --- a/input/input_remapping.c +++ b/input/input_remapping.c @@ -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++) { diff --git a/menu/cbs/menu_cbs_get_value.c b/menu/cbs/menu_cbs_get_value.c index 9a097cc4a3..a2347fce15 100644 --- a/menu/cbs/menu_cbs_get_value.c +++ b/menu/cbs/menu_cbs_get_value.c @@ -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); } diff --git a/menu/cbs/menu_cbs_start.c b/menu/cbs/menu_cbs_start.c index 26f9dd6aac..38783fc43e 100644 --- a/menu/cbs/menu_cbs_start.c +++ b/menu/cbs/menu_cbs_start.c @@ -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; } diff --git a/retroarch.c b/retroarch.c index 07f229fd1b..9fd8db30a0 100644 --- a/retroarch.c +++ b/retroarch.c @@ -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); diff --git a/runloop.h b/runloop.h index 1509707355..1609c8bc3c 100644 --- a/runloop.h +++ b/runloop.h @@ -206,6 +206,7 @@ typedef struct global char ups[PATH_MAX_LENGTH]; char bps[PATH_MAX_LENGTH]; char ips[PATH_MAX_LENGTH]; + char remapfile[PATH_MAX_LENGTH]; } name; /* A list of save types and associated paths for all content. */