summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-08-03 01:06:33 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-08-03 01:11:42 -0700
commit7cfd27cdd40f5e4144c0970dbba9d174b7d3e965 (patch)
tree2360d523fe6d4c602e53e91d90bc8320ef17d757
parenta37fa4cbba40fa233e43d04847865b08d43ec5cc (diff)
til: til_module_setup_randomize() raw value for spec.preferred
Now whenever a setting value/preferred input is derived from a setting, it'll want to get the raw value to preserve any prefix.
-rw-r--r--src/til.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/til.c b/src/til.c
index e09575e..b660d2f 100644
--- a/src/til.c
+++ b/src/til.c
@@ -642,13 +642,13 @@ int til_module_setup_randomize(const til_module_t *module, til_settings_t *setti
*/
name = til_settings_get_value_by_idx(settings, 0, &setting);
if (!name)
- return -EINVAL; /* TODO: add a first setting from module->name? current callers always pass the module name as the setting string */
+ return -EINVAL;
if (!setting->desc) {
r = til_setting_desc_new( settings,
&(til_setting_spec_t){
.name = "Renderer module",
- .preferred = module->name,
+ .preferred = til_setting_get_raw_value(setting),
.as_label = 1
}, &setting->desc);
if (r < 0)
© All Rights Reserved