Refactor away runloop_msg_queue_pull
This commit is contained in:
parent
45a663c100
commit
f1ea400456
|
@ -1902,9 +1902,13 @@ void video_driver_frame(const void *data, unsigned width,
|
|||
unsigned output_width = 0;
|
||||
unsigned output_height = 0;
|
||||
unsigned output_pitch = 0;
|
||||
const char *msg = runloop_msg_queue_pull();
|
||||
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,13 +429,18 @@ static void xui_frame(void *data)
|
|||
|
||||
XuiRenderSetViewTransform( app.GetDC(), &matOrigView );
|
||||
|
||||
message = runloop_msg_queue_pull();
|
||||
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
|
||||
{
|
||||
message = runloop_msg_queue_pull();
|
||||
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);
|
||||
}
|
||||
|
|
11
runloop.c
11
runloop.c
|
@ -101,17 +101,6 @@ global_t *global_get_ptr(void)
|
|||
return &g_extern;
|
||||
}
|
||||
|
||||
const char *runloop_msg_queue_pull(void)
|
||||
{
|
||||
const char *ret = NULL;
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_LOCK, NULL);
|
||||
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &ret);
|
||||
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_UNLOCK, NULL);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void runloop_msg_queue_push(const char *msg,
|
||||
unsigned prio, unsigned duration,
|
||||
bool flush)
|
||||
|
|
Loading…
Reference in New Issue