mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-09 03:29:43 -10:00
msg_hash: convert 56 runloop_msg_queue_push sites to _pair API
The dominant pattern across the codebase was: const char *_msg = msg_hash_to_str(MSG_X); runloop_msg_queue_push(_msg, strlen(_msg), prio, dur, ...); Two operations were paying for one: msg_hash_to_str dispatched through a per-locale switch returning the literal, then strlen walked the returned string at runtime to recover a length that was already a compile-time constant inside the switch. Convert mechanical declaration-and-push sites to: msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_X); runloop_msg_queue_push(_p.s, _p.len, prio, dur, ...); One dispatch returns both fields. Each MSG_HASH case sets .s to the literal and .len to sizeof(literal) - 1 (constant), so the per-case body is two register stores + a struct return. Strict MSVC C89 throughout — declarations stay at the top of their enclosing block exactly as before. Why _pair and not _len here? The naive substitution 'strlen(_msg)' -> 'msg_hash_to_str_len(MSG_X)' doubles the switch dispatch — the parent commit's bench measured that at 0.61x (a 1.6x slowdown) vs the original strlen. _pair runs at 1.18x (faster) because it fuses both lookups into one dispatch. See the parent commit message for the full table. Sites converted (56 total): retroarch.c 20 runloop.c 13 runahead.c 6 cheat_manager.c 4 tasks/task_database.c 3 tasks/task_movie.c 2 tasks/task_content.c 1 tasks/task_netplay_find_content.c 1 tasks/task_pl_thumbnail_download.c 1 tasks/task_screenshot.c 1 ui/drivers/ui_qt_widgets.cpp 4 Intermediate uses of _msg in adjacent RARCH_LOG / RARCH_WARN / RARCH_ERR calls between the declaration and the push were rewritten to use _p.s in lockstep, so the converted blocks remain self-consistent and the log output is byte-identical. Strict C89 verified across all 11 touched files (-Werror=declaration-after-statement -Werror=vla). Behavior is byte-identical to the prior pattern for every (msg, locale) combination, since the API contract preserves p.s == msg_hash_to_str(msg) (byte-equal) p.len == strlen(p.s) exactly. About 17 _msg-related sites remain in the same files using shapes outside this script's safe-rewrite set — function-scope '_msg' that is assigned multiple times in different branches, multi-line ternary expressions, and a couple of cases where _msg holds a string literal rather than a msg_hash_to_str result. Those are mechanical but per-site and worth a careful follow-up commit rather than bundling here.
This commit is contained in:
1 parent
25266fba7b
commit
2c13b7c456
11 files changed
+119
-119
No files matched your search
+8
-8
@@ -1806,14 +1806,14 @@ void cheat_manager_match_action(enum cheat_match_action_type match_action, unsig
|
||||
if (!cheat_manager_add_new_code(cheat_st->search_bit_size, idx, (mask << (byte_part * bits)),
|
||||
cheat_st->big_endian, curr_val))
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_CHEAT_SEARCH_ADD_MATCH_FAIL);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 180, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_CHEAT_SEARCH_ADD_MATCH_FAIL);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_CHEAT_SEARCH_ADD_MATCH_SUCCESS);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 180, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_CHEAT_SEARCH_ADD_MATCH_SUCCESS);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_SUCCESS);
|
||||
}
|
||||
return;
|
||||
@@ -1859,14 +1859,14 @@ void cheat_manager_match_action(enum cheat_match_action_type match_action, unsig
|
||||
if (!cheat_manager_add_new_code(cheat_st->search_bit_size, idx, 0xFF,
|
||||
cheat_st->big_endian, curr_val))
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_CHEAT_SEARCH_ADD_MATCH_FAIL);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 180, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_CHEAT_SEARCH_ADD_MATCH_FAIL);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_CHEAT_SEARCH_ADD_MATCH_SUCCESS);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 180, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_CHEAT_SEARCH_ADD_MATCH_SUCCESS);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
return;
|
||||
|
||||
+42
-42
@@ -3146,8 +3146,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (rcheevos_hardcore_active())
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_CHEEVOS_LOAD_SAVEFILE_PREVENTED_BY_HARDCORE_MODE);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 0, 180, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_CHEEVOS_LOAD_SAVEFILE_PREVENTED_BY_HARDCORE_MODE);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 0, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_WARNING);
|
||||
return false;
|
||||
}
|
||||
@@ -3323,8 +3323,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
{
|
||||
if (!core_info_current_supports_runahead())
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_RUNAHEAD_CORE_DOES_NOT_SUPPORT_RUNAHEAD);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 100, false, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_RUNAHEAD_CORE_DOES_NOT_SUPPORT_RUNAHEAD);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 100, false, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
break;
|
||||
}
|
||||
@@ -3354,8 +3354,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_RUNAHEAD_DISABLED);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 100, false, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_RUNAHEAD_DISABLED);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 100, false, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
|
||||
@@ -3382,8 +3382,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
|
||||
if (old_inited && !runloop_st->preempt_data)
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_PREEMPT_DISABLED);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 100, false, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_PREEMPT_DISABLED);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 100, false, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
else if (runloop_st->preempt_data)
|
||||
@@ -3523,8 +3523,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (rcheevos_hardcore_active())
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_CHEEVOS_LOAD_STATE_PREVENTED_BY_HARDCORE_MODE);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 0, 180, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_CHEEVOS_LOAD_STATE_PREVENTED_BY_HARDCORE_MODE);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 0, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_WARNING);
|
||||
return false;
|
||||
}
|
||||
@@ -3592,9 +3592,9 @@ bool command_event(enum event_command cmd, void *data)
|
||||
break;
|
||||
case CMD_EVENT_RESET:
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_RESET);
|
||||
RARCH_LOG("[Core] %s.\n", _msg);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 120, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_RESET);
|
||||
RARCH_LOG("[Core] %s.\n", _p.s);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 120, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
core_reset();
|
||||
@@ -3641,9 +3641,9 @@ bool command_event(enum event_command cmd, void *data)
|
||||
res = movie_start_playback(input_st, replay_path);
|
||||
if (!res)
|
||||
{
|
||||
const char *_msg =
|
||||
msg_hash_to_str(MSG_FAILED_TO_LOAD_MOVIE_FILE);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 180, true, NULL,
|
||||
msg_hash_str_pair_t _p =
|
||||
msg_hash_to_str_pair(MSG_FAILED_TO_LOAD_MOVIE_FILE);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_ERR("[Replay] %s.\n", _msg);
|
||||
}
|
||||
@@ -3674,8 +3674,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
configuration_set_int(settings, settings->ints.replay_slot, replay_slot);
|
||||
if (!res)
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_FAILED_TO_START_MOVIE_RECORD);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 180, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_FAILED_TO_START_MOVIE_RECORD);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_ERR("[Replay] %s.\n", _msg);
|
||||
}
|
||||
@@ -4192,8 +4192,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
input_st->flags |= INP_FLAG_KB_LINEFEED_ENABLE;
|
||||
else
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_OSK_OVERLAY_NOT_SET);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 100, false, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_OSK_OVERLAY_NOT_SET);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 100, false, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
|
||||
@@ -4628,10 +4628,10 @@ bool command_event(enum event_command cmd, void *data)
|
||||
case CMD_EVENT_SHUTDOWN:
|
||||
{
|
||||
#if defined(__linux__) && !defined(ANDROID)
|
||||
const char *_msg = msg_hash_to_str(MSG_VALUE_SHUTTING_DOWN);
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_VALUE_SHUTTING_DOWN);
|
||||
if (settings->bools.config_save_on_exit)
|
||||
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 180, true, NULL,
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
#ifdef HAVE_LAKKA
|
||||
system("nohup /usr/bin/lakka-shutdown.sh 2>&1 >/dev/null & exit");
|
||||
@@ -4645,10 +4645,10 @@ bool command_event(enum event_command cmd, void *data)
|
||||
case CMD_EVENT_REBOOT:
|
||||
{
|
||||
#if defined(__linux__) && !defined(ANDROID)
|
||||
const char *_msg = msg_hash_to_str(MSG_VALUE_REBOOTING);
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_VALUE_REBOOTING);
|
||||
if (settings->bools.config_save_on_exit)
|
||||
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 180, true, NULL,
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
#ifdef HAVE_LAKKA
|
||||
system("nohup /usr/bin/lakka-reboot.sh 2>&1 >/dev/null & exit");
|
||||
@@ -4684,8 +4684,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
if ( playlist_size(g_defaults.content_favorites)
|
||||
>= playlist_capacity(g_defaults.content_favorites))
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_ADD_TO_FAVORITES_FAILED);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 180, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_ADD_TO_FAVORITES_FAILED);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
|
||||
return true;
|
||||
}
|
||||
@@ -4767,8 +4767,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
if ( playlist_size(playlist)
|
||||
>= playlist_capacity(playlist))
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_ADD_TO_PLAYLIST_FAILED);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 180, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_ADD_TO_PLAYLIST_FAILED);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
|
||||
return true;
|
||||
}
|
||||
@@ -5205,15 +5205,15 @@ bool command_event(enum event_command cmd, void *data)
|
||||
else if (!task_push_netplay_content_reload(NULL))
|
||||
{
|
||||
#ifdef HAVE_DYNAMIC
|
||||
const char *_msg = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED);
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED);
|
||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_SERVER, NULL);
|
||||
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 480, true, NULL,
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 480, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
#else
|
||||
const char *_msg = msg_hash_to_str(MSG_NETPLAY_NEED_CONTENT_LOADED);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 480, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_NETPLAY_NEED_CONTENT_LOADED);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 480, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
#endif
|
||||
|
||||
@@ -5341,8 +5341,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
return command_event_disk_control_append_image(path);
|
||||
else
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 120, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 120, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
|
||||
}
|
||||
}
|
||||
@@ -5379,8 +5379,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 120, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 120, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
|
||||
}
|
||||
}
|
||||
@@ -5407,8 +5407,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 120, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 120, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
|
||||
}
|
||||
}
|
||||
@@ -5435,8 +5435,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 120, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 120, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
|
||||
}
|
||||
}
|
||||
@@ -5455,8 +5455,8 @@ bool command_event(enum event_command cmd, void *data)
|
||||
disk_control_set_index(&sys_info->disk_control, *index, false);
|
||||
else
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 120, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 120, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
+15
-15
@@ -1244,10 +1244,10 @@ void runahead_run(void *data,
|
||||
|
||||
if (!runahead_create(runloop_st))
|
||||
{
|
||||
const char *_msg =
|
||||
msg_hash_to_str(MSG_RUNAHEAD_CORE_DOES_NOT_SUPPORT_SAVESTATES);
|
||||
msg_hash_str_pair_t _p =
|
||||
msg_hash_to_str_pair(MSG_RUNAHEAD_CORE_DOES_NOT_SUPPORT_SAVESTATES);
|
||||
if (!runahead_hide_warnings)
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 0, 2 * 60, true, NULL,
|
||||
runloop_msg_queue_push(_p.s, _p.len, 0, 2 * 60, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _msg);
|
||||
goto force_input_dirty;
|
||||
@@ -1297,9 +1297,9 @@ void runahead_run(void *data,
|
||||
{
|
||||
if (!runahead_save_state(runloop_st))
|
||||
{
|
||||
const char *_msg =
|
||||
msg_hash_to_str(MSG_RUNAHEAD_FAILED_TO_SAVE_STATE);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 0, 3 * 60, true, NULL,
|
||||
msg_hash_str_pair_t _p =
|
||||
msg_hash_to_str_pair(MSG_RUNAHEAD_FAILED_TO_SAVE_STATE);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 0, 3 * 60, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _msg);
|
||||
return;
|
||||
@@ -1310,8 +1310,8 @@ void runahead_run(void *data,
|
||||
{
|
||||
if (!runahead_load_state(runloop_st))
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_RUNAHEAD_FAILED_TO_LOAD_STATE);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 0, 3 * 60, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_RUNAHEAD_FAILED_TO_LOAD_STATE);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 0, 3 * 60, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _msg);
|
||||
return;
|
||||
@@ -1324,11 +1324,11 @@ void runahead_run(void *data,
|
||||
#if HAVE_DYNAMIC
|
||||
if (!secondary_core_ensure_exists(runloop_st, config_get_ptr()))
|
||||
{
|
||||
const char *_msg =
|
||||
msg_hash_to_str(MSG_RUNAHEAD_FAILED_TO_CREATE_SECONDARY_INSTANCE);
|
||||
msg_hash_str_pair_t _p =
|
||||
msg_hash_to_str_pair(MSG_RUNAHEAD_FAILED_TO_CREATE_SECONDARY_INSTANCE);
|
||||
runahead_secondary_core_destroy(runloop_st);
|
||||
runloop_st->flags &= ~RUNLOOP_FLAG_RUNAHEAD_SECONDARY_CORE_AVAILABLE;
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 0, 3 * 60, true, NULL,
|
||||
runloop_msg_queue_push(_p.s, _p.len, 0, 3 * 60, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _msg);
|
||||
goto force_input_dirty;
|
||||
@@ -1349,8 +1349,8 @@ void runahead_run(void *data,
|
||||
|
||||
if (!runahead_save_state(runloop_st))
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_RUNAHEAD_FAILED_TO_SAVE_STATE);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 0, 3 * 60, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_RUNAHEAD_FAILED_TO_SAVE_STATE);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 0, 3 * 60, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _msg);
|
||||
return;
|
||||
@@ -1358,8 +1358,8 @@ void runahead_run(void *data,
|
||||
|
||||
if (!runahead_load_state_secondary(runloop_st, settings))
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_RUNAHEAD_FAILED_TO_LOAD_STATE);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 0, 3 * 60, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_RUNAHEAD_FAILED_TO_LOAD_STATE);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 0, 3 * 60, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_WARN("[Run-Ahead] %s\n", _msg);
|
||||
return;
|
||||
|
||||
@@ -2458,8 +2458,8 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
||||
|
||||
if (rec_st->data)
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_RESTARTING_RECORDING_DUE_TO_DRIVER_REINIT);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 2, 180, false, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_RESTARTING_RECORDING_DUE_TO_DRIVER_REINIT);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 2, 180, false, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
if (rec_st->streaming_enable)
|
||||
{
|
||||
@@ -2698,8 +2698,8 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
||||
* the recording. */
|
||||
if (rec_st->data)
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_RESTARTING_RECORDING_DUE_TO_DRIVER_REINIT);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 2, 180, false, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_RESTARTING_RECORDING_DUE_TO_DRIVER_REINIT);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 2, 180, false, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
if (rec_st->streaming_enable)
|
||||
{
|
||||
@@ -3710,9 +3710,9 @@ bool runloop_init_libretro_symbols(
|
||||
path_get_realsize(RARCH_PATH_CORE)
|
||||
)))
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_FAILED_TO_OPEN_LIBRETRO_CORE);
|
||||
RARCH_ERR("[Core] %s: \"%s\"\nError(s): %s\n", _msg, path, dylib_error());
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 180, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_FAILED_TO_OPEN_LIBRETRO_CORE);
|
||||
RARCH_ERR("[Core] %s: \"%s\"\nError(s): %s\n", _p.s, path, dylib_error());
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
return false;
|
||||
}
|
||||
@@ -4918,8 +4918,8 @@ void runloop_pause_checks(void)
|
||||
if (!widgets_active)
|
||||
#endif
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_PAUSED);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 1, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_PAUSED);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 1, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
|
||||
@@ -5253,8 +5253,8 @@ bool core_options_remove_override(bool game_specific)
|
||||
|
||||
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_CORE_OPTIONS_FILE_REMOVED_SUCCESSFULLY);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 100, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_CORE_OPTIONS_FILE_REMOVED_SUCCESSFULLY);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 100, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -5265,8 +5265,8 @@ bool core_options_remove_override(bool game_specific)
|
||||
|
||||
error:
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_ERROR_REMOVING_CORE_OPTIONS_FILE);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 100, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_ERROR_REMOVING_CORE_OPTIONS_FILE);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 100, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
|
||||
}
|
||||
|
||||
@@ -5344,8 +5344,8 @@ void core_options_reset(const char* label)
|
||||
}
|
||||
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_CORE_OPTIONS_RESET);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 100, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_CORE_OPTIONS_RESET);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 100, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
}
|
||||
@@ -5889,13 +5889,13 @@ static enum runloop_state_enum runloop_check_state(
|
||||
|
||||
if (!trig_reset_key)
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_PRESS_AGAIN_TO_RESET);
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_PRESS_AGAIN_TO_RESET);
|
||||
float target_hz = 0.0;
|
||||
|
||||
runloop_environment_cb(
|
||||
RETRO_ENVIRONMENT_GET_TARGET_REFRESH_RATE, &target_hz);
|
||||
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, QUIT_DELAY_USEC * target_hz / 1000000,
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, QUIT_DELAY_USEC * target_hz / 1000000,
|
||||
true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_WARNING);
|
||||
}
|
||||
}
|
||||
@@ -5926,13 +5926,13 @@ static enum runloop_state_enum runloop_check_state(
|
||||
|
||||
if (!trig_close_key)
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_PRESS_AGAIN_TO_CLOSE_CONTENT);
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_PRESS_AGAIN_TO_CLOSE_CONTENT);
|
||||
float target_hz = 0.0;
|
||||
|
||||
runloop_environment_cb(
|
||||
RETRO_ENVIRONMENT_GET_TARGET_REFRESH_RATE, &target_hz);
|
||||
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, QUIT_DELAY_USEC * target_hz / 1000000,
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, QUIT_DELAY_USEC * target_hz / 1000000,
|
||||
true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_WARNING);
|
||||
}
|
||||
}
|
||||
@@ -5973,13 +5973,13 @@ static enum runloop_state_enum runloop_check_state(
|
||||
|
||||
if (!trig_quit_key)
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_PRESS_AGAIN_TO_QUIT);
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_PRESS_AGAIN_TO_QUIT);
|
||||
float target_hz = 0.0;
|
||||
|
||||
runloop_environment_cb(
|
||||
RETRO_ENVIRONMENT_GET_TARGET_REFRESH_RATE, &target_hz);
|
||||
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, QUIT_DELAY_USEC * target_hz / 1000000,
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, QUIT_DELAY_USEC * target_hz / 1000000,
|
||||
true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_WARNING);
|
||||
}
|
||||
}
|
||||
@@ -6994,8 +6994,8 @@ static enum runloop_state_enum runloop_check_state(
|
||||
if ( (runloop_st->flags & RUNLOOP_FLAG_FASTMOTION)
|
||||
&& settings->bools.notification_show_fast_forward)
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_FAST_FORWARD);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 1, false, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_FAST_FORWARD);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 1, false, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
}
|
||||
@@ -7062,15 +7062,15 @@ static enum runloop_state_enum runloop_check_state(
|
||||
if (rewind_st->flags
|
||||
& STATE_MGR_REWIND_ST_FLAG_FRAME_IS_REVERSED)
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_SLOW_MOTION_REWIND);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 1, false, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_SLOW_MOTION_REWIND);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 1, false, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_SLOW_MOTION);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 1, false, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_SLOW_MOTION);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 1, false, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2846,9 +2846,9 @@ bool content_init(void)
|
||||
case MSG_FAILED_TO_LOAD_CONTENT:
|
||||
case MSG_ERROR_LIBRETRO_CORE_REQUIRES_CONTENT:
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(error_enum);
|
||||
RARCH_ERR("[Content] %s\n", _msg);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 2, ret ? 1 : 180, false, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(error_enum);
|
||||
RARCH_ERR("[Content] %s\n", _p.s);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 2, ret ? 1 : 180, false, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1990,8 +1990,8 @@ static void task_manual_content_scan_handler(retro_task_t *task)
|
||||
= manual_content_scan_get_content_list(
|
||||
manual_scan->task_config)))
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_MANUAL_CONTENT_SCAN_INVALID_CONTENT);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 100, true, NULL,\
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_MANUAL_CONTENT_SCAN_INVALID_CONTENT);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 100, true, NULL,\
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
goto task_finished;
|
||||
}
|
||||
@@ -2006,8 +2006,8 @@ static void task_manual_content_scan_handler(retro_task_t *task)
|
||||
logiqx_dat_init(
|
||||
manual_scan->task_config->dat_file_path)))
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_MANUAL_CONTENT_SCAN_DAT_FILE_LOAD_ERROR);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 100, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_MANUAL_CONTENT_SCAN_DAT_FILE_LOAD_ERROR);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 100, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
goto task_finished;
|
||||
}
|
||||
@@ -2554,9 +2554,9 @@ bool task_push_manual_content_scan(
|
||||
if (!manual_content_scan_get_task_config(
|
||||
manual_scan->task_config, playlist_dir))
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_MANUAL_CONTENT_SCAN_INVALID_CONFIG);
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_MANUAL_CONTENT_SCAN_INVALID_CONFIG);
|
||||
RARCH_ERR("[Scanner] Invalid scan config\n");
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 100, true, NULL,
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 100, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
goto error;
|
||||
}
|
||||
|
||||
+4
-4
@@ -261,8 +261,8 @@ static bool bsv_movie_start_record(input_driver_state_t * input_st, char *path)
|
||||
input_st->bsv_movie_state_handle. */
|
||||
if (!(state = bsv_movie_init_internal(path, RARCH_MOVIE_RECORD)))
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_FAILED_TO_START_MOVIE_RECORD);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 180, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_FAILED_TO_START_MOVIE_RECORD);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_ERR("[Replay] %s\n", _msg);
|
||||
return false;
|
||||
@@ -401,10 +401,10 @@ bool movie_stop_record(input_driver_state_t *input_st)
|
||||
{
|
||||
bsv_movie_t *movie = input_st->bsv_movie_state_handle;
|
||||
uint32_t frame_count;
|
||||
const char *_msg = msg_hash_to_str(MSG_MOVIE_RECORD_STOPPED);
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_MOVIE_RECORD_STOPPED);
|
||||
if (!movie)
|
||||
return false;
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 2, 180, true, NULL,
|
||||
runloop_msg_queue_push(_p.s, _p.len, 2, 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_LOG("[Replay] %s\n", _msg);
|
||||
#ifdef HAVE_STATESTREAM
|
||||
|
||||
@@ -716,8 +716,8 @@ static void task_netplay_crc_scan_callback(retro_task_t *task,
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 480, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
#else
|
||||
const char *_msg = msg_hash_to_str(MSG_NETPLAY_NEED_CONTENT_LOADED);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 480, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_NETPLAY_NEED_CONTENT_LOADED);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 480, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -940,8 +940,8 @@ bool task_push_pl_entry_thumbnail_download(
|
||||
}
|
||||
if (next_flag == PLAYLIST_THUMBNAIL_FLAG_NONE)
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_NO_THUMBNAIL_DOWNLOAD_POSSIBLE);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 100, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_NO_THUMBNAIL_DOWNLOAD_POSSIBLE);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 100, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
goto error;
|
||||
|
||||
|
||||
@@ -227,8 +227,8 @@ static void task_screenshot_handler(retro_task_t *task)
|
||||
/* Report any errors */
|
||||
if (!ret)
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_FAILED_TO_TAKE_SCREENSHOT);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_FAILED_TO_TAKE_SCREENSHOT);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1,
|
||||
(state->flags & SS_TASK_FLAG_IS_PAUSED) ? 1 : 180, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
|
||||
|
||||
|
||||
@@ -3835,14 +3835,14 @@ void ShaderParamsDialog::operateShaderPreset(bool save, const char *path, unsign
|
||||
|
||||
if (ret)
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_SHADER_PRESET_SAVED_SUCCESSFULLY);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 100, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_SHADER_PRESET_SAVED_SUCCESSFULLY);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 100, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_ERROR_SAVING_SHADER_PRESET);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 100, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_ERROR_SAVING_SHADER_PRESET);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 100, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
|
||||
}
|
||||
}
|
||||
@@ -3853,8 +3853,8 @@ void ShaderParamsDialog::operateShaderPreset(bool save, const char *path, unsign
|
||||
path_dir_video_shader,
|
||||
path_dir_menu_config))
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_SHADER_PRESET_REMOVED_SUCCESSFULLY);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 100, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_SHADER_PRESET_REMOVED_SUCCESSFULLY);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 100, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
@@ -3863,8 +3863,8 @@ void ShaderParamsDialog::operateShaderPreset(bool save, const char *path, unsign
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_ERROR_REMOVING_SHADER_PRESET);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 100, true, NULL,
|
||||
msg_hash_str_pair_t _p = msg_hash_to_str_pair(MSG_ERROR_REMOVING_SHADER_PRESET);
|
||||
runloop_msg_queue_push(_p.s, _p.len, 1, 100, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user