From fee5d2a88097ec3da3c068441884af55d4df29f7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 9 Dec 2015 09:34:19 +0100 Subject: [PATCH] Add RUNLOOP_CTL_HAS_CORE_OPTIONS --- menu/menu_displaylist.c | 2 +- runloop.c | 2 ++ runloop.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index c125e57729..0416e84d35 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -3033,7 +3033,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) info->need_push = true; break; case DISPLAYLIST_CORE_OPTIONS: - if (system && system->core_options) + if (runloop_ctl(RUNLOOP_CTL_HAS_CORE_OPTIONS, NULL)) { size_t opts = core_option_size(system->core_options); diff --git a/runloop.c b/runloop.c index 9ad90eb10e..ad7fc88f98 100644 --- a/runloop.c +++ b/runloop.c @@ -521,6 +521,8 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) sizeof(system->valid_extensions)); system->block_extract = system->info.block_extract; break; + case RUNLOOP_CTL_HAS_CORE_OPTIONS: + return system && system->core_options; case RUNLOOP_CTL_SYSTEM_INFO_FREE: if (system->core_options) { diff --git a/runloop.h b/runloop.h index d105941a0c..ca31eefc13 100644 --- a/runloop.h +++ b/runloop.h @@ -86,6 +86,7 @@ enum runloop_ctl_state RUNLOOP_CTL_MSG_QUEUE_LOCK, RUNLOOP_CTL_MSG_QUEUE_UNLOCK, RUNLOOP_CTL_MSG_QUEUE_FREE, + RUNLOOP_CTL_HAS_CORE_OPTIONS, RUNLOOP_CTL_IS_CORE_OPTION_UPDATED, RUNLOOP_CTL_CORE_OPTION_PREV, RUNLOOP_CTL_CORE_OPTION_NEXT,