From 95c2f03dca179259a11025b3e773ef705ae4f894 Mon Sep 17 00:00:00 2001 From: neonloop Date: Thu, 12 Aug 2021 18:52:54 +0000 Subject: Allows core-hidden options --- options.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'options.c') diff --git a/options.c b/options.c index 249af71..ba80bd1 100644 --- a/options.c +++ b/options.c @@ -128,6 +128,7 @@ void options_init(const struct retro_core_option_definition *defs) { entry->blocked = option_blocked(def->key); if (entry->blocked) core_options.visible_len--; + entry->visible = true; len = strlen(def->desc) + 1; entry->desc = (char *)calloc(len, sizeof(char)); @@ -243,6 +244,7 @@ void options_init_variables(const struct retro_variable *vars) { if (entry->blocked) core_options.visible_len--; + entry->visible = true; len = strlen(var->value) + 1; value = (char *)calloc(len, sizeof(char)); if (!value) { @@ -332,15 +334,6 @@ struct core_option_entry* options_get_entry(const char* key) { return NULL; } - -bool options_is_blocked(const char *key) { - struct core_option_entry* entry = options_get_entry(key); - if (entry) { - return entry->blocked; - } - return true; -} - const char* options_get_value(const char* key) { struct core_option_entry* entry = options_get_entry(key); if (entry) @@ -389,6 +382,13 @@ void options_set_value_index(const char* key, int value) { } } +void options_set_visible(const char* key, bool visible) { + struct core_option_entry* entry = options_get_entry(key); + if (entry) { + entry->visible = visible; + } +} + const char** options_get_options(const char* key) { struct core_option_entry* entry = options_get_entry(key); if (entry) { -- cgit v1.2.3