From 45e23c9dd9ff189d054096304201da2bae915511 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Mon, 22 Sep 2025 13:05:42 +0200 Subject: [PATCH] change set info option to method --- src/kds_s2000w_handler_opts.c | 42 +++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/src/kds_s2000w_handler_opts.c b/src/kds_s2000w_handler_opts.c index 0740b19..f3a795b 100644 --- a/src/kds_s2000w_handler_opts.c +++ b/src/kds_s2000w_handler_opts.c @@ -244,6 +244,28 @@ void _kds_s2000w_handler_opts_set_enable_color_drop_out_aggressiveness(json_obje color_drop_out_aggressiveness->cap &= ~SANE_CAP_SOFT_SELECT; } +void _kds_s2000w_handler_opts_set_info_option(uint32_t option, int32_t* info) { + if (info == NULL) + return; + + switch (option) { + case 3: + case 7: + case 8: + case 14: + case 16: + case 19: + case 21: + case 24: + *info = RELOAD_OPTIONS; + break; + case 31: + *info = RELOAD_OPTIONS | RELOAD_PARAMS; + break; + default: + break; + } +} void kds_s2000w_handler_opts_get_option(handler* h, uint32_t option, void* value, int32_t* info) { @@ -377,24 +399,6 @@ void kds_s2000w_handler_opts_set_option(handler* h, uint32_t option, void* value break; } - switch (option) { - case 3: - case 7: - case 8: - case 14: - case 16: - case 19: - case 21: - case 24: - if (info != NULL) - *info = RELOAD_OPTIONS; - break; - case 31: - if (info != NULL) - *info = RELOAD_OPTIONS | RELOAD_PARAMS; - default: - break; - } - + _kds_s2000w_handler_opts_set_info_option(option, info); _kds_s2000w_handler_opts_set_options(h); } \ No newline at end of file -- 2.47.3