mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-26 04:36:56 +00:00
Merge pull request #10264 from jdgleaver/remap-msg-fix
Fix 'remap file loaded' notification message
This commit is contained in:
commit
932d12a684
@ -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);
|
||||
|
@ -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."
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user