mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 22:14:17 +00:00
Merge pull request #8204 from natinusala/master
ui_companion: fix status message
This commit is contained in:
commit
294901db5a
@ -22,6 +22,7 @@
|
||||
#include "../../msg_hash.h"
|
||||
|
||||
#include "../../tasks/task_content.h"
|
||||
#include "../../ui/ui_companion_driver.h"
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../menu_animation.h"
|
||||
@ -293,7 +294,8 @@ static void msg_widget_msg_transition_animation_done(void *userdata)
|
||||
static bool menu_widgets_msg_queue_push_internal(retro_task_t *task, const char *msg,
|
||||
unsigned duration,
|
||||
char *title,
|
||||
enum message_queue_icon icon, enum message_queue_category category)
|
||||
enum message_queue_icon icon, enum message_queue_category category,
|
||||
unsigned prio, bool flush)
|
||||
{
|
||||
menu_widget_msg_t* msg_widget = NULL;
|
||||
|
||||
@ -304,6 +306,9 @@ static bool menu_widgets_msg_queue_push_internal(retro_task_t *task, const char
|
||||
runloop_msg_queue_lock();
|
||||
#endif
|
||||
|
||||
ui_companion_driver_msg_queue_push(msg,
|
||||
prio, task ? duration : duration * 60 / 1000, flush);
|
||||
|
||||
if (fifo_write_avail(msg_queue) > 0)
|
||||
{
|
||||
/* Get current msg if it exists */
|
||||
@ -466,9 +471,10 @@ static bool menu_widgets_msg_queue_push_internal(retro_task_t *task, const char
|
||||
bool menu_widgets_msg_queue_push(const char *msg,
|
||||
unsigned duration,
|
||||
char *title,
|
||||
enum message_queue_icon icon, enum message_queue_category category)
|
||||
enum message_queue_icon icon, enum message_queue_category category,
|
||||
unsigned prio, bool flush)
|
||||
{
|
||||
return menu_widgets_msg_queue_push_internal(NULL, msg, duration, title, icon, category);
|
||||
return menu_widgets_msg_queue_push_internal(NULL, msg, duration, title, icon, category, prio, flush);
|
||||
}
|
||||
|
||||
static void menu_widgets_unfold_end(void *userdata)
|
||||
@ -1944,13 +1950,16 @@ void menu_widgets_take_screenshot(void)
|
||||
menu_animation_push(&entry);
|
||||
}
|
||||
|
||||
bool menu_widgets_task_msg_queue_push(retro_task_t *task)
|
||||
bool menu_widgets_task_msg_queue_push(retro_task_t *task,
|
||||
const char *msg,
|
||||
unsigned prio, unsigned duration,
|
||||
bool flush)
|
||||
{
|
||||
if (!menu_widgets_inited)
|
||||
return false;
|
||||
|
||||
if (task->title != NULL && !task->mute)
|
||||
menu_widgets_msg_queue_push_internal(task, NULL, 0, NULL, MESSAGE_QUEUE_CATEGORY_INFO, MESSAGE_QUEUE_ICON_DEFAULT);
|
||||
menu_widgets_msg_queue_push_internal(task, msg, duration, NULL, MESSAGE_QUEUE_CATEGORY_INFO, MESSAGE_QUEUE_ICON_DEFAULT, prio, flush);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -42,7 +42,8 @@ bool menu_widgets_ready(void);
|
||||
bool menu_widgets_msg_queue_push(const char *msg,
|
||||
unsigned duration,
|
||||
char *title,
|
||||
enum message_queue_icon icon, enum message_queue_category category);
|
||||
enum message_queue_icon icon, enum message_queue_category category,
|
||||
unsigned prio, bool flush);
|
||||
|
||||
bool menu_widgets_volume_update_and_show(void);
|
||||
|
||||
@ -54,7 +55,10 @@ bool menu_widgets_set_paused(bool is_paused);
|
||||
bool menu_widgets_set_fast_forward(bool is_fast_forward);
|
||||
bool menu_widgets_set_rewind(bool is_rewind);
|
||||
|
||||
bool menu_widgets_task_msg_queue_push(retro_task_t *task);
|
||||
bool menu_widgets_task_msg_queue_push(retro_task_t *task,
|
||||
const char *msg,
|
||||
unsigned prio, unsigned duration,
|
||||
bool flush);
|
||||
|
||||
void menu_widgets_take_screenshot(void);
|
||||
|
||||
|
@ -2445,7 +2445,7 @@ void runloop_task_msg_queue_push(retro_task_t *task, const char *msg,
|
||||
bool flush)
|
||||
{
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!video_driver_has_widgets() || !menu_widgets_task_msg_queue_push(task))
|
||||
if (!video_driver_has_widgets() || !menu_widgets_task_msg_queue_push(task, msg, prio, duration, flush))
|
||||
#endif
|
||||
runloop_msg_queue_push(msg, prio, duration, flush, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
@ -2460,7 +2460,7 @@ void runloop_msg_queue_push(const char *msg,
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
/* People have 60FPS in mind when they use runloop_msg_queue_push */
|
||||
if (video_driver_has_widgets() && menu_widgets_msg_queue_push(msg, duration / 60 * 1000, title, icon, category))
|
||||
if (video_driver_has_widgets() && menu_widgets_msg_queue_push(msg, duration / 60 * 1000, title, icon, category, prio, flush))
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user