mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 14:28:47 +00:00
Cleanups
This commit is contained in:
parent
f1ea400456
commit
8c8ea6c167
@ -1905,9 +1905,7 @@ void video_driver_frame(const void *data, unsigned width,
|
||||
const char *msg = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_LOCK, NULL);
|
||||
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &msg);
|
||||
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_UNLOCK, NULL);
|
||||
|
||||
if (!video_driver_ctl(RARCH_DISPLAY_CTL_IS_ACTIVE, NULL))
|
||||
return;
|
||||
|
@ -429,17 +429,13 @@ static void xui_frame(void *data)
|
||||
|
||||
XuiRenderSetViewTransform( app.GetDC(), &matOrigView );
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_LOCK, NULL);
|
||||
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &message);
|
||||
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_UNLOCK, NULL);
|
||||
|
||||
if (message)
|
||||
xui_render_message(message);
|
||||
else
|
||||
{
|
||||
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_LOCK, NULL);
|
||||
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &message);
|
||||
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_UNLOCK, NULL);
|
||||
|
||||
if (message)
|
||||
xui_render_message(message);
|
||||
|
@ -910,12 +910,14 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
||||
}
|
||||
break;
|
||||
case RUNLOOP_CTL_MSG_QUEUE_PULL:
|
||||
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_LOCK, NULL);
|
||||
{
|
||||
const char **ret = (const char**)data;
|
||||
if (!ret)
|
||||
return false;
|
||||
*ret = msg_queue_pull(runloop_msg_queue);
|
||||
}
|
||||
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_UNLOCK, NULL);
|
||||
break;
|
||||
case RUNLOOP_CTL_MSG_QUEUE_FREE:
|
||||
#ifdef HAVE_THREADS
|
||||
|
Loading…
Reference in New Issue
Block a user