mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-18 00:32:46 +00:00
Add msg_queue_push to UI companion driver interface
This commit is contained in:
parent
0730af5919
commit
f87154773d
@ -290,5 +290,13 @@ void menu_display_timedate(char *s, size_t len, unsigned time_mode)
|
||||
void menu_display_msg_queue_push(const char *msg, unsigned prio, unsigned duration,
|
||||
bool flush)
|
||||
{
|
||||
|
||||
rarch_main_msg_queue_push(msg, prio, duration, flush);
|
||||
|
||||
if (ui_companion_is_on_foreground())
|
||||
{
|
||||
const ui_companion_driver_t *ui = ui_companion_get_ptr();
|
||||
if (ui->msg_queue_push)
|
||||
ui->msg_queue_push(msg, prio, duration, flush);
|
||||
}
|
||||
}
|
||||
|
@ -555,11 +555,11 @@ int menu_iterate_render(void)
|
||||
|
||||
if (menu->state.do_messagebox && menu->state.msg[0] != '\0')
|
||||
{
|
||||
const ui_companion_driver_t *ui = ui_companion_get_ptr();
|
||||
if (driver->render_messagebox)
|
||||
driver->render_messagebox(menu->state.msg);
|
||||
if (ui_companion_is_on_foreground())
|
||||
{
|
||||
const ui_companion_driver_t *ui = ui_companion_get_ptr();
|
||||
if (ui->render_messagebox)
|
||||
ui->render_messagebox(menu->state.msg);
|
||||
}
|
||||
|
@ -498,5 +498,6 @@ const ui_companion_driver_t ui_companion_cocoa = {
|
||||
ui_companion_cocoa_notify_list_pushed,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"cocoa",
|
||||
};
|
||||
|
@ -576,6 +576,7 @@ const ui_companion_driver_t ui_companion_cocoatouch = {
|
||||
ui_companion_cocoatouch_notify_content_loaded,
|
||||
ui_companion_cocoatouch_notify_list_pushed,
|
||||
ui_companion_cocoatouch_notify_refresh,
|
||||
NULL,
|
||||
ui_companion_cocoatouch_render_messagebox,
|
||||
"cocoatouch",
|
||||
};
|
||||
|
@ -87,5 +87,6 @@ const ui_companion_driver_t ui_companion_null = {
|
||||
ui_companion_null_notify_list_pushed,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"null",
|
||||
};
|
||||
|
@ -130,5 +130,6 @@ const ui_companion_driver_t ui_companion_qt = {
|
||||
ui_companion_qt_notify_list_pushed,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"qt",
|
||||
};
|
||||
|
@ -42,6 +42,7 @@ typedef struct ui_companion_driver
|
||||
void (*notify_content_loaded)(void *data);
|
||||
void (*notify_list_loaded)(void *data, file_list_t *list, file_list_t *menu_list);
|
||||
void (*notify_refresh)(void *data);
|
||||
void (*msg_queue_push)(const char *msg, unsigned priority, unsigned duration, bool flush);
|
||||
void (*render_messagebox)(const char *msg);
|
||||
const char *ident;
|
||||
} ui_companion_driver_t;
|
||||
|
Loading…
x
Reference in New Issue
Block a user