From 927d80146389cb54301ff60d9063db3259d61b4f Mon Sep 17 00:00:00 2001 From: jdgleaver Date: Thu, 12 Mar 2020 12:16:23 +0000 Subject: [PATCH] Fix 'remap file loaded' notification message --- configuration.c | 9 +++++++-- intl/msg_hash_us.h | 4 ++++ msg_hash.h | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/configuration.c b/configuration.c index 7cc241ce9b..689a6d54dd 100644 --- a/configuration.c +++ b/configuration.c @@ -3517,6 +3517,7 @@ bool config_load_remap(const char *directory_input_remapping, const char *core_name = system ? system->info.library_name : NULL; const char *rarch_path_basename = path_get(RARCH_PATH_BASENAME); const char *game_name = path_basename(rarch_path_basename); + enum msg_hash_enums msg_remap_loaded = MSG_GAME_REMAP_FILE_LOADED; char content_dir_name[PATH_MAX_LENGTH]; if (string_is_empty(core_name) || string_is_empty(game_name)) @@ -3578,6 +3579,8 @@ bool config_load_remap(const char *directory_input_remapping, if (input_remapping_load_file(new_conf, game_path)) { rarch_ctl(RARCH_CTL_SET_REMAPS_GAME_ACTIVE, NULL); + /* msg_remap_loaded is set to MSG_GAME_REMAP_FILE_LOADED + * by default - no need to change it here */ goto success; } } @@ -3589,6 +3592,7 @@ bool config_load_remap(const char *directory_input_remapping, if (input_remapping_load_file(new_conf, content_path)) { rarch_ctl(RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE, NULL); + msg_remap_loaded = MSG_DIRECTORY_REMAP_FILE_LOADED; goto success; } } @@ -3600,6 +3604,7 @@ bool config_load_remap(const char *directory_input_remapping, if (input_remapping_load_file(new_conf, core_path)) { rarch_ctl(RARCH_CTL_SET_REMAPS_CORE_ACTIVE, NULL); + msg_remap_loaded = MSG_CORE_REMAP_FILE_LOADED; goto success; } } @@ -3613,8 +3618,8 @@ bool config_load_remap(const char *directory_input_remapping, return false; success: - runloop_msg_queue_push(msg_hash_to_str( - MSG_GAME_REMAP_FILE_LOADED), 1, 100, false, + runloop_msg_queue_push( + msg_hash_to_str(msg_remap_loaded), 1, 100, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO); free(content_path); free(remap_directory); diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 3d6a0b5e3e..26710329e0 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -7637,6 +7637,10 @@ MSG_HASH( MSG_GAME_REMAP_FILE_LOADED, "Game remap file loaded." ) +MSG_HASH( + MSG_DIRECTORY_REMAP_FILE_LOADED, + "Content directory remap file loaded." + ) MSG_HASH( MSG_CORE_REMAP_FILE_LOADED, "Core remap file loaded." diff --git a/msg_hash.h b/msg_hash.h index 1b03a6123b..b3b523d1ac 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -450,6 +450,7 @@ enum msg_hash_enums MSG_NO_CONTENT_STARTING_DUMMY_CORE, MSG_CONFIG_OVERRIDE_LOADED, MSG_GAME_REMAP_FILE_LOADED, + MSG_DIRECTORY_REMAP_FILE_LOADED, MSG_CORE_REMAP_FILE_LOADED, MSG_RUNAHEAD_CORE_DOES_NOT_SUPPORT_SAVESTATES, MSG_RUNAHEAD_FAILED_TO_SAVE_STATE,