From 5e57b96225116e95e2555d7dc924ea530859a8f7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 22 Sep 2015 22:44:56 +0200 Subject: [PATCH] Take it outside of the mutex lock --- runloop_msg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runloop_msg.c b/runloop_msg.c index 1bc3f7534f..95d839ff99 100644 --- a/runloop_msg.c +++ b/runloop_msg.c @@ -73,16 +73,16 @@ void rarch_main_msg_queue_push(const char *msg, unsigned prio, unsigned duration msg_queue_clear(g_msg_queue); msg_queue_push(g_msg_queue, msg, prio, duration); +#ifdef HAVE_THREADS + slock_unlock(mq_lock); +#endif + 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, prio, duration, flush); } - -#ifdef HAVE_THREADS - slock_unlock(mq_lock); -#endif } void rarch_main_msg_queue_free(void)