From 3d29b9138cec8235de36a1b79448c61ebd278626 Mon Sep 17 00:00:00 2001 From: gb <741021719@qq.com> Date: Tue, 10 Jan 2023 17:30:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DTWAIN=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E5=BC=A0=E6=95=B0BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sane/scanner.cpp | 9 ++------- sane/scanner.h | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/sane/scanner.cpp b/sane/scanner.cpp index 7cb40ee..c4d4023 100644 --- a/sane/scanner.cpp +++ b/sane/scanner.cpp @@ -1109,9 +1109,9 @@ bool scanner::get_option_value_with_parent(int sn, set_opt_value setv, void* par return handled; } -bool scanner::set_option_value_with_parent(int sn, void* data, int* err) // return true if handled +bool scanner::set_option_value_with_parent(int sn, void* data, int* err) // return true if handled sn { - bool handled = true; + bool handled = false; if (sn == scan_count_id_) { @@ -1135,11 +1135,6 @@ bool scanner::set_option_value_with_parent(int sn, void* data, int* err) // retu *err = hg_sane_middleware::instance()->set_option(handle_, scan_mode_id_, SANE_ACTION_SET_VALUE, val, &after); } delete[] val; - // handled = false; - } - else - { - handled = false; } return handled; diff --git a/sane/scanner.h b/sane/scanner.h index 996933c..63044c2 100644 --- a/sane/scanner.h +++ b/sane/scanner.h @@ -82,7 +82,7 @@ class scanner : public ISaneInvoker, virtual public refer void extension_erase_color(int id); bool get_option_value_with_parent(int sn, set_opt_value setv, void* param); // return true if handled - bool set_option_value_with_parent(int sn, void* data, int* err); // return true if handled + bool set_option_value_with_parent(int sn, void* data, int* err); // return true if handled sn int set_option_value(int sn, SANE_Value_Type type, int size, void* data); typedef struct _ex_api