mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(Menu widgets) Checks were wrong - should be correct now
This commit is contained in:
parent
111a7fea92
commit
8db00a17af
@ -503,16 +503,18 @@ static void rcheevos_award(rcheevos_cheevo_t* cheevo, int mode)
|
||||
cheevo->active &= ~RCHEEVOS_ACTIVE_SOFTCORE;
|
||||
|
||||
/* Show the OSD message. */
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!menu_widgets_ready())
|
||||
#endif
|
||||
{
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
menu_widgets_push_achievement(cheevo->info->title, cheevo->info->badge);
|
||||
bool widgets_ready = !menu_widgets_ready();
|
||||
if (widgets_ready)
|
||||
menu_widgets_push_achievement(cheevo->info->title, cheevo->info->badge);
|
||||
else
|
||||
#endif
|
||||
snprintf(buffer, sizeof(buffer), "Achievement Unlocked: %s", cheevo->info->title);
|
||||
runloop_msg_queue_push(buffer, 0, 2 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
runloop_msg_queue_push(cheevo->info->description, 0, 3 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
{
|
||||
snprintf(buffer, sizeof(buffer), "Achievement Unlocked: %s", cheevo->info->title);
|
||||
runloop_msg_queue_push(buffer, 0, 2 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
runloop_msg_queue_push(cheevo->info->description, 0, 3 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
/* Start the award task. */
|
||||
|
56
retroarch.c
56
retroarch.c
@ -2201,15 +2201,12 @@ bool command_set_shader(const char *arg)
|
||||
snprintf(msg, sizeof(msg),
|
||||
"Shader: \"%s\"", arg ? path_basename(arg) : "null");
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
if (!menu_widgets_inited)
|
||||
#endif
|
||||
{
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
if (menu_widgets_inited)
|
||||
menu_widgets_set_message(msg);
|
||||
else
|
||||
#endif
|
||||
runloop_msg_queue_push(msg, 1, 120, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
RARCH_LOG("%s \"%s\".\n",
|
||||
msg_hash_to_str(MSG_APPLYING_SHADER),
|
||||
arg);
|
||||
@ -2870,14 +2867,11 @@ static void command_event_set_volume(float gain)
|
||||
new_volume);
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!menu_widgets_inited)
|
||||
#endif
|
||||
{
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (menu_widgets_inited)
|
||||
menu_widgets_volume_update_and_show();
|
||||
else
|
||||
#endif
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
|
||||
RARCH_LOG("%s\n", msg);
|
||||
|
||||
@ -3781,16 +3775,13 @@ static void retroarch_pause_checks(void)
|
||||
command_event(CMD_EVENT_AUDIO_STOP, NULL);
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!menu_widgets_inited)
|
||||
#endif
|
||||
{
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (menu_widgets_inited)
|
||||
menu_widgets_paused = is_paused;
|
||||
else
|
||||
#endif
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_PAUSED), 1,
|
||||
1, true,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
|
||||
|
||||
if (!is_idle)
|
||||
@ -4259,15 +4250,11 @@ TODO: Add a setting for these tweaks */
|
||||
audio_driver_mute_enable = !audio_driver_mute_enable;
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!menu_widgets_inited)
|
||||
#endif
|
||||
{
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (menu_widgets_inited)
|
||||
menu_widgets_volume_update_and_show();
|
||||
else
|
||||
#endif
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_SEND_DEBUG_INFO:
|
||||
@ -6744,14 +6731,11 @@ static bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
const struct retro_message *msg = (const struct retro_message*)data;
|
||||
RARCH_LOG("Environ SET_MESSAGE: %s\n", msg->msg);
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
if (!menu_widgets_inited)
|
||||
#endif
|
||||
{
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
if (menu_widgets_inited)
|
||||
menu_widgets_set_libretro_message(msg->msg, roundf((float)msg->frames / 60.0f * 1000.0f));
|
||||
else
|
||||
#endif
|
||||
runloop_msg_queue_push(msg->msg, 3, msg->frames, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -23221,12 +23205,11 @@ static void update_fastforwarding_state(void)
|
||||
if (runloop_fastmotion)
|
||||
{
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!menu_widgets_inited)
|
||||
if (menu_widgets_inited)
|
||||
menu_widgets_fast_forward = true;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
menu_widgets_fast_forward = true;
|
||||
#endif
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_FAST_FORWARD), 1, 1, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
@ -23929,17 +23912,16 @@ static enum runloop_state runloop_check_state(void)
|
||||
rewinding = state_manager_check_rewind(BIT256_GET(current_bits, RARCH_REWIND),
|
||||
settings->uints.rewind_granularity, runloop_paused, s, sizeof(s), &t);
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!menu_widgets_inited)
|
||||
#endif
|
||||
if (rewinding)
|
||||
runloop_msg_queue_push(s, 0, t, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (menu_widgets_inited)
|
||||
menu_widgets_rewinding = rewinding;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (rewinding)
|
||||
runloop_msg_queue_push(s, 0, t, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
/* Checks if slowmotion toggle/hold was being pressed and/or held. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user