From 06c45b5aabdaf9c46f6653e32b4a58031462672f Mon Sep 17 00:00:00 2001 From: 13038267101 Date: Fri, 14 Apr 2023 16:39:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=BA=E5=AF=B8=E6=A3=80=E6=B5=8B=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E5=86=99=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twain/twain/huagaods.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/twain/twain/huagaods.cpp b/twain/twain/huagaods.cpp index 232b016..b7634e4 100644 --- a/twain/twain/huagaods.cpp +++ b/twain/twain/huagaods.cpp @@ -2257,7 +2257,7 @@ void huagao_ds::init_support_caps(void) int ret = SCANNER_ERR_OK; SET_SANE_OPT(ret, scanner_, ex_duplex, &mech); - + load_sane_util::log_info(mech ? L"Set1 Duplex is: true\r\n" : L"Set1 Duplex is: false\r\n", 0); int count = count_; if (mech && count_ >= 2) { @@ -2273,6 +2273,9 @@ void huagao_ds::init_support_caps(void) std::vector all; GET_SANE_OPT(bool, scanner_, ex_duplex, NULL, &all); dup = all[sane_opts::RANGE_POS_CURRENT]; + + load_sane_util::log_info(dup ? L"Get Duplex is: true\r\n" : L"Get Duplex is: false\r\n", 0); + int ret = SCANNER_ERR_OK; int count = count_; if (dup && count_ >= 2) @@ -2443,13 +2446,13 @@ void huagao_ds::init_support_caps(void) if (Msg::Set == msg) { auto autodetectborder = data.currentItem(); int ret = SCANNER_ERR_OK; - SET_SANE_OPT(ret, scanner_, is_erase_black_frame, (bool*)&autodetectborder); + SET_SANE_OPT(ret, scanner_, is_size_check, (bool*)&autodetectborder); return ret == SCANNER_ERR_OK ? success() : badValue(); } Bool init = false, erase = false; std::vector all; - GET_SANE_OPT(bool, scanner_, is_erase_black_frame, NULL, &all); + GET_SANE_OPT(bool, scanner_, is_size_check, NULL, &all); init = (bool)all[sane_opts::RANGE_POS_DEFAULT]; erase = (bool)all[sane_opts::RANGE_POS_CURRENT]; return CapSupGetAllReset(msg, data, { false,true }, erase, init, erase ? 1 : 0, 0);