From 0d64b48c3a2d4c8e4b3244a199a45fe3c853e30a Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Sat, 13 Jan 2024 14:12:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9B=BD=E4=BA=A7=E7=B3=BB?= =?UTF-8?q?=E7=BB=9Fsane=E9=A9=B1=E5=8A=A8=E7=9A=84=E5=8F=8C=E5=BC=A0?= =?UTF-8?q?=E7=BA=B8=E6=B5=81=E7=A8=8B=EF=BC=9B=20=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E6=97=B6=E7=AC=AC=E4=B8=80=E5=BC=A0=E4=B8=BA?= =?UTF-8?q?=E5=8F=8C=E5=BC=A0=EF=BC=8Csane=5Fstart=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=80=BC=E4=B8=8D=E8=83=BD=E6=AD=A3=E5=B8=B8=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hgdriver/hgdev/hg_scanner.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hgdriver/hgdev/hg_scanner.cpp b/hgdriver/hgdev/hg_scanner.cpp index 99cb52d..105f385 100644 --- a/hgdriver/hgdev/hg_scanner.cpp +++ b/hgdriver/hgdev/hg_scanner.cpp @@ -4165,9 +4165,9 @@ int hg_scanner::wait_one_image_from_start(bool& handled) handled = false; if (!async_io_) // non-callback, async do this in upper level { + handled = true; while (is_running() != THREAD_RUNNING_IDLE) { - handled = true; if (final_imgs_.size()) { break; @@ -4195,8 +4195,9 @@ int hg_scanner::wait_one_image_from_start(bool& handled) } else if (handled) // overed normal or exception { + bool reserveDoubleImg = (double_paper_handle_) ? false : true; if (status_ == SCANNER_ERR_OK - || status_ == SCANNER_ERR_DEVICE_DOUBLE_FEEDING) // 双张特殊处理,视为成功 + || (reserveDoubleImg && status_ == SCANNER_ERR_DEVICE_DOUBLE_FEEDING)) // 双张校验时特殊处理,视为成功 { SANE_Bool has_paper = SANE_FALSE;