mirror of
https://github.com/libretro/RetroArch
synced 2025-04-17 02:43:03 +00:00
Cleanups
This commit is contained in:
parent
903648f1fe
commit
166c0c2311
@ -30,10 +30,6 @@
|
||||
#include "gfx_display.h"
|
||||
#include "font_driver.h"
|
||||
|
||||
#ifdef HAVE_ACCESSIBILITY
|
||||
#include "../accessibility.h"
|
||||
#endif
|
||||
|
||||
#include "../msg_hash.h"
|
||||
|
||||
#include "../tasks/task_content.h"
|
||||
@ -346,14 +342,11 @@ void gfx_widgets_msg_queue_push(
|
||||
char *title,
|
||||
enum message_queue_icon icon,
|
||||
enum message_queue_category category,
|
||||
unsigned prio, bool flush)
|
||||
unsigned prio, bool flush,
|
||||
bool menu_is_alive)
|
||||
{
|
||||
menu_widget_msg_t* msg_widget = NULL;
|
||||
|
||||
#ifdef HAVE_ACCESSIBILITY
|
||||
if (is_accessibility_enabled())
|
||||
accessibility_speak_priority((char*)msg, 0);
|
||||
#endif
|
||||
if (fifo_write_avail(msg_queue) > 0)
|
||||
{
|
||||
/* Get current msg if it exists */
|
||||
@ -434,7 +427,7 @@ void gfx_widgets_msg_queue_push(
|
||||
* text with expanded width */
|
||||
unsigned title_length = (unsigned)strlen(title);
|
||||
char *msg = strdup(title);
|
||||
unsigned width = menu_driver_is_alive()
|
||||
unsigned width = menu_is_alive
|
||||
? msg_queue_default_rect_width_menu_alive
|
||||
: msg_queue_default_rect_width;
|
||||
unsigned text_width = font_driver_get_message_width(
|
||||
|
@ -46,7 +46,8 @@ void gfx_widgets_msg_queue_push(
|
||||
char *title,
|
||||
enum message_queue_icon icon,
|
||||
enum message_queue_category category,
|
||||
unsigned prio, bool flush);
|
||||
unsigned prio, bool flush,
|
||||
bool menu_is_alive);
|
||||
|
||||
void gfx_widgets_volume_update_and_show(float new_volume,
|
||||
bool mute);
|
||||
|
12
retroarch.c
12
retroarch.c
@ -25958,7 +25958,11 @@ static void runloop_task_msg_queue_push(
|
||||
runloop_msg_queue_lock();
|
||||
ui_companion_driver_msg_queue_push(msg,
|
||||
prio, task ? duration : duration * 60 / 1000, flush);
|
||||
gfx_widgets_msg_queue_push(task, msg, duration, NULL, (enum message_queue_icon)MESSAGE_QUEUE_CATEGORY_INFO, (enum message_queue_category)MESSAGE_QUEUE_ICON_DEFAULT, prio, flush);
|
||||
#ifdef HAVE_ACCESSIBILITY
|
||||
if (is_accessibility_enabled())
|
||||
accessibility_speak_priority((char*)msg, 0);
|
||||
#endif
|
||||
gfx_widgets_msg_queue_push(task, msg, duration, NULL, (enum message_queue_icon)MESSAGE_QUEUE_CATEGORY_INFO, (enum message_queue_category)MESSAGE_QUEUE_ICON_DEFAULT, prio, flush, menu_driver_alive);
|
||||
runloop_msg_queue_unlock();
|
||||
}
|
||||
else
|
||||
@ -26828,9 +26832,13 @@ void runloop_msg_queue_push(const char *msg,
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (gfx_widgets_inited)
|
||||
{
|
||||
#ifdef HAVE_ACCESSIBILITY
|
||||
if (is_accessibility_enabled())
|
||||
accessibility_speak_priority((char*)msg, 0);
|
||||
#endif
|
||||
gfx_widgets_msg_queue_push(NULL, msg,
|
||||
roundf((float)duration / 60.0f * 1000.0f),
|
||||
title, icon, category, prio, flush);
|
||||
title, icon, category, prio, flush, menu_driver_alive);
|
||||
duration = duration * 60 / 1000;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user