This commit is contained in:
twinaphex 2016-02-13 05:22:07 +01:00
parent f1ea400456
commit 8c8ea6c167
3 changed files with 2 additions and 6 deletions

View File

@ -1905,9 +1905,7 @@ void video_driver_frame(const void *data, unsigned width,
const char *msg = NULL; const char *msg = NULL;
settings_t *settings = config_get_ptr(); 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_PULL, &msg);
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_UNLOCK, NULL);
if (!video_driver_ctl(RARCH_DISPLAY_CTL_IS_ACTIVE, NULL)) if (!video_driver_ctl(RARCH_DISPLAY_CTL_IS_ACTIVE, NULL))
return; return;

View File

@ -429,17 +429,13 @@ static void xui_frame(void *data)
XuiRenderSetViewTransform( app.GetDC(), &matOrigView ); 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_PULL, &message);
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_UNLOCK, NULL);
if (message) if (message)
xui_render_message(message); xui_render_message(message);
else else
{ {
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_LOCK, NULL);
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &message); runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &message);
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_UNLOCK, NULL);
if (message) if (message)
xui_render_message(message); xui_render_message(message);

View File

@ -910,12 +910,14 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
} }
break; break;
case RUNLOOP_CTL_MSG_QUEUE_PULL: case RUNLOOP_CTL_MSG_QUEUE_PULL:
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_LOCK, NULL);
{ {
const char **ret = (const char**)data; const char **ret = (const char**)data;
if (!ret) if (!ret)
return false; return false;
*ret = msg_queue_pull(runloop_msg_queue); *ret = msg_queue_pull(runloop_msg_queue);
} }
runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_UNLOCK, NULL);
break; break;
case RUNLOOP_CTL_MSG_QUEUE_FREE: case RUNLOOP_CTL_MSG_QUEUE_FREE:
#ifdef HAVE_THREADS #ifdef HAVE_THREADS