diff --git a/runloop.c b/runloop.c index 73064e0b5b..871dbc6496 100644 --- a/runloop.c +++ b/runloop.c @@ -155,6 +155,14 @@ void runloop_msg_queue_push(const char *msg, } +char* runloop_msg_queue_pull() +{ + runloop_ctx_msg_info_t msg_info; + runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &msg_info); + + return strdup(msg_info.msg); +} + #ifdef HAVE_MENU static bool runloop_cmd_get_state_menu_toggle_button_combo( settings_t *settings, diff --git a/runloop.h b/runloop.h index bfd0281447..de671c4041 100644 --- a/runloop.h +++ b/runloop.h @@ -324,6 +324,8 @@ int runloop_iterate(unsigned *sleep_ms); void runloop_msg_queue_push(const char *msg, unsigned prio, unsigned duration, bool flush); +char* runloop_msg_queue_pull(); + bool runloop_ctl(enum runloop_ctl_state state, void *data);