From 10ca0c6e8a9eaa4b01d15e216cfa404f432b24ef Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sat, 27 Jan 2024 18:37:08 +0100 Subject: [PATCH] add constraint output type --- src/kds_s2000w_net.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/kds_s2000w_net.c b/src/kds_s2000w_net.c index 017906a..58c4740 100644 --- a/src/kds_s2000w_net.c +++ b/src/kds_s2000w_net.c @@ -183,9 +183,13 @@ const SANE_Option_Descriptor* _sane_kds_s2000w_net_get_option_descriptor( option_descriptors[option].name = "outputtype"; option_descriptors[option].title = "outputtype"; option_descriptors[option].desc = "outputtype"; - option_descriptors[option].cap = SANE_CAP_SOFT_DETECT; - option_descriptors[option].constraint_type = SANE_CONSTRAINT_NONE; - option_descriptors[option].constraint.string_list = NULL; + option_descriptors[option].cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT; + option_descriptors[option].constraint_type = SANE_CONSTRAINT_STRING_LIST; + SANE_String_Const* constraint_output_type = malloc(sizeof(char*) * 3); + constraint_output_type[0] = "Images"; + constraint_output_type[1] = "SinglePageColorPDFPlus2TIFs"; + constraint_output_type[2] = NULL; + option_descriptors[option].constraint.string_list = constraint_output_type; break; case 9: option_descriptors[option].name = "colorautobrightnessmode"; -- 2.39.5