aboutsummaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorneonloop2021-08-12 18:52:54 +0000
committerneonloop2021-08-12 18:52:54 +0000
commit95c2f03dca179259a11025b3e773ef705ae4f894 (patch)
tree4a0e06e11280f31333172c041056ca569fb79d71 /options.c
parent147ce424f9d908cab634942e448200805a5e5430 (diff)
downloadpicoarch-95c2f03dca179259a11025b3e773ef705ae4f894.tar.gz
picoarch-95c2f03dca179259a11025b3e773ef705ae4f894.tar.bz2
picoarch-95c2f03dca179259a11025b3e773ef705ae4f894.zip
Allows core-hidden options
Diffstat (limited to 'options.c')
-rw-r--r--options.c18
1 files changed, 9 insertions, 9 deletions
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) {