]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
add constraint for background smoothing mode
authorBastian Dehn <hhaalo@arcor.de>
Sat, 27 Jan 2024 18:13:48 +0000 (19:13 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 27 Jan 2024 18:13:48 +0000 (19:13 +0100)
src/kds_s2000w_net.c

index 2b435c7c01199f5062ad424724acc12faa32b403..ce0d0b81060ff61072dbf8d625c8c63a21da9687 100644 (file)
@@ -294,9 +294,14 @@ const SANE_Option_Descriptor* _sane_kds_s2000w_net_get_option_descriptor(
                        option_descriptors[option].name = "backgroundsmoothingmode";
                        option_descriptors[option].title = "backgroundsmoothingmode";
                        option_descriptors[option].desc = "backgroundsmoothingmode";
-                       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_background_smoothing_mode = malloc(sizeof(char*) * 4);
+                       constraint_background_smoothing_mode[0] = "None";
+                       constraint_background_smoothing_mode[1] = "AutomaticAdvanced";
+                       constraint_background_smoothing_mode[2] = "Automatic";
+                       constraint_background_smoothing_mode[3] = NULL;
+                       option_descriptors[option].constraint.string_list = constraint_background_smoothing_mode;
                        break;
                case 18:
                        option_descriptors[option].name = "backgroundsmoothingaggressiveness";