diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 12fbb39c79..c248407ea1 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -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; diff --git a/menu/drivers/xui.cpp b/menu/drivers/xui.cpp index cefa39a7d2..192545bb41 100644 --- a/menu/drivers/xui.cpp +++ b/menu/drivers/xui.cpp @@ -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); } diff --git a/runloop.c b/runloop.c index 6a3643d94f..f4d28e4b3c 100644 --- a/runloop.c +++ b/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) diff --git a/runloop.h b/runloop.h index 67bc5b8763..1509707355 100644 --- a/runloop.h +++ b/runloop.h @@ -316,9 +316,6 @@ int runloop_iterate(unsigned *sleep_ms); void runloop_msg_queue_push(const char *msg, unsigned prio, unsigned duration, bool flush); -const char *runloop_msg_queue_pull(void); - - bool runloop_ctl(enum runloop_ctl_state state, void *data);