]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
only change output type by color mode with bw
authorBastian Dehn <hhaalo@arcor.de>
Mon, 29 Jan 2024 20:17:37 +0000 (21:17 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Mon, 29 Jan 2024 20:17:37 +0000 (21:17 +0100)
src/kds_s2000w_handler.c

index 835e5c8575350b9fa1c9e13e6534ee971c79fdb2..6f40472ee32678f8c001bd51538dd0c7354c74d2 100644 (file)
@@ -269,6 +269,15 @@ void kds_s2000w_handler_set_option(int option, void* value, int* info)
                        _write_int_value_to_json(value_object, value);
                        break;
                case 9:
+                       value_object = json_object_object_get(config, "ColorMode");
+                       const char* color_mode = json_object_get_string(value_object);
+                       if (strcmp(color_mode, "Color_BW") != 0) {
+                               value_object = NULL;
+                               *info = RELOAD_OPTIONS;
+                               break;
+                       }
+
+                       value_object = NULL;
                        value_object = json_object_object_get(config, "OutputType");
                        _write_string_value_to_json(value_object, value);
                        break;