mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 13:14:04 +00:00
Cleanups
This commit is contained in:
parent
2350ef9234
commit
b4e85b9bbd
31
runloop.c
31
runloop.c
@ -131,23 +131,6 @@ global_t *global_get_ptr(void)
|
|||||||
return &g_extern;
|
return &g_extern;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool runloop_msg_queue_push_internal(runloop_ctx_msg_info_t *msg_info)
|
|
||||||
{
|
|
||||||
if (!msg_info || !runloop_msg_queue)
|
|
||||||
return false;
|
|
||||||
msg_queue_push(runloop_msg_queue, msg_info->msg,
|
|
||||||
msg_info->prio, msg_info->duration);
|
|
||||||
|
|
||||||
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_info->msg,
|
|
||||||
msg_info->prio, msg_info->duration, msg_info->flush);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void runloop_msg_queue_push(const char *msg,
|
void runloop_msg_queue_push(const char *msg,
|
||||||
unsigned prio, unsigned duration,
|
unsigned prio, unsigned duration,
|
||||||
bool flush)
|
bool flush)
|
||||||
@ -170,7 +153,19 @@ void runloop_msg_queue_push(const char *msg,
|
|||||||
msg_info.duration = duration;
|
msg_info.duration = duration;
|
||||||
msg_info.flush = flush;
|
msg_info.flush = flush;
|
||||||
|
|
||||||
runloop_msg_queue_push_internal(&msg_info);
|
if (runloop_msg_queue)
|
||||||
|
{
|
||||||
|
msg_queue_push(runloop_msg_queue, msg_info.msg,
|
||||||
|
msg_info.prio, msg_info.duration);
|
||||||
|
|
||||||
|
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_info.msg,
|
||||||
|
msg_info.prio, msg_info.duration, msg_info.flush);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
slock_unlock(_runloop_msg_queue_lock);
|
slock_unlock(_runloop_msg_queue_lock);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user