From 7cfd27cdd40f5e4144c0970dbba9d174b7d3e965 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Thu, 3 Aug 2023 01:06:33 -0700 Subject: 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. --- src/til.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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) -- cgit v1.2.3