From 3d4a8b6a4387f0f6b4eb0f04f5dd5435255f7bdb Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Tue, 30 Apr 2024 19:57:54 +0200 Subject: [PATCH] change load color and depth --- src/kds_s2000w_handler_opts.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/kds_s2000w_handler_opts.c b/src/kds_s2000w_handler_opts.c index e2fdb89..2eb991a 100644 --- a/src/kds_s2000w_handler_opts.c +++ b/src/kds_s2000w_handler_opts.c @@ -223,15 +223,18 @@ void kds_s2000w_handler_set_option(handler* h, int option, void* value, int* inf h->current_metadata->format = 1; h->current_metadata->channels = 3; h->current_metadata->depth = 8; - if (info != NULL) - *info = RELOAD_OPTIONS; + } else if (strcmp(str_Value, "Gray") == 0) { + h->current_metadata->format = 0; + h->current_metadata->channels = 1; + h->current_metadata->depth = 8; } else { h->current_metadata->format = 0; h->current_metadata->channels = 1; + h->current_metadata->depth = 1; } if (info != NULL) - *info |= RELOAD_PARAMS; + *info = RELOAD_PARAMS | RELOAD_OPTIONS; break; case 4: -- 2.39.5