add a function to retrieve the current OSD line

This commit is contained in:
radius 2016-05-07 19:47:20 -05:00
parent a64fe6ce63
commit 6999322a53
2 changed files with 10 additions and 0 deletions

View File

@ -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 #ifdef HAVE_MENU
static bool runloop_cmd_get_state_menu_toggle_button_combo( static bool runloop_cmd_get_state_menu_toggle_button_combo(
settings_t *settings, settings_t *settings,

View File

@ -324,6 +324,8 @@ int runloop_iterate(unsigned *sleep_ms);
void runloop_msg_queue_push(const char *msg, unsigned prio, void runloop_msg_queue_push(const char *msg, unsigned prio,
unsigned duration, bool flush); unsigned duration, bool flush);
char* runloop_msg_queue_pull();
bool runloop_ctl(enum runloop_ctl_state state, void *data); bool runloop_ctl(enum runloop_ctl_state state, void *data);