diff --git a/command_event.c b/command_event.c index 38991c3c7b..6ceffccfa9 100644 --- a/command_event.c +++ b/command_event.c @@ -352,7 +352,9 @@ static void event_disk_control_set_index(unsigned idx) snprintf(msg, sizeof(msg), "Setting disk %u of %u in tray.", idx + 1, num_disks); else - strlcpy(msg, "Removed disk from tray.", sizeof(msg)); + strlcpy(msg, + msg_hash_to_str(MSG_REMOVED_DISK_FROM_TRAY), + sizeof(msg)); } else { @@ -360,7 +362,9 @@ static void event_disk_control_set_index(unsigned idx) snprintf(msg, sizeof(msg), "Failed to set disk %u of %u.", idx + 1, num_disks); else - strlcpy(msg, "Failed to remove disk from tray.", sizeof(msg)); + strlcpy(msg, + msg_hash_to_str(MSG_FAILED_TO_REMOVE_DISK_FROM_TRAY), + sizeof(msg)); error = true; } @@ -400,7 +404,7 @@ static void event_check_disk_prev( if (!disk_prev_enable) { - RARCH_ERR("Got invalid disk index from libretro.\n"); + RARCH_ERR("%s.\n", msg_hash_to_str(MSG_GOT_INVALID_DISK_INDEX)); return; } @@ -435,7 +439,7 @@ static void event_check_disk_next( if (!disk_next_enable) { - RARCH_ERR("Got invalid disk index from libretro.\n"); + RARCH_ERR("%s.\n", msg_hash_to_str(MSG_GOT_INVALID_DISK_INDEX)); return; } diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index 01dd1b5d4d..ad0619c826 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -20,6 +20,12 @@ const char *msg_hash_to_str_us(uint32_t hash) { switch (hash) { + case MSG_GOT_INVALID_DISK_INDEX: + return "Got invalid disk index."; + case MSG_FAILED_TO_REMOVE_DISK_FROM_TRAY: + return "Failed to remove disk from tray."; + case MSG_REMOVED_DISK_FROM_TRAY: + return "Removed disk from tray."; case MSG_VIRTUAL_DISK_TRAY: return "virtual disk tray."; case MSG_FAILED_TO: diff --git a/msg_hash.h b/msg_hash.h index e15c752cd5..4abeef65d6 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -90,6 +90,11 @@ #define MSG_TO 0x005979a8U #define MSG_VIRTUAL_DISK_TRAY 0x4aa37f15U +#define MSG_REMOVED_DISK_FROM_TRAY 0xf26a9653U + +#define MSG_FAILED_TO_REMOVE_DISK_FROM_TRAY 0xc1c9a655U + +#define MSG_GOT_INVALID_DISK_INDEX 0xb138dd76U const char *msg_hash_to_str(uint32_t hash);