From 6999322a539024472dd71ae9ad9bb401291f7081 Mon Sep 17 00:00:00 2001 From: radius Date: Sat, 7 May 2016 19:47:20 -0500 Subject: [PATCH] add a function to retrieve the current OSD line --- runloop.c | 8 ++++++++ runloop.h | 2 ++ 2 files changed, 10 insertions(+) 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);