From a2952850402889207e26bf028e589e28b4d975b4 Mon Sep 17 00:00:00 2001 From: 13038267101 Date: Thu, 11 May 2023 14:25:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B464=E4=BD=8D=E4=B8=8B=20?= =?UTF-8?q?=EF=BC=8C=E7=8A=B6=E6=80=81=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- device/scanner.vcxproj | 3 +-- sane/sane.vcxproj | 3 +-- sane/scanner.cpp | 2 +- twain/twain/huagaods.cpp | 5 +++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/device/scanner.vcxproj b/device/scanner.vcxproj index 0d68a59..6288c6c 100644 --- a/device/scanner.vcxproj +++ b/device/scanner.vcxproj @@ -118,8 +118,7 @@ - - + copy "$(TargetPath)" C:\Windows\twain_32\HuagoTwain\ /Y diff --git a/sane/sane.vcxproj b/sane/sane.vcxproj index 8834c97..8be8fd2 100644 --- a/sane/sane.vcxproj +++ b/sane/sane.vcxproj @@ -118,8 +118,7 @@ - - + copy "$(TargetPath)" C:\Windows\twain_32\HuagoTwain\$(TargetName) /y diff --git a/sane/scanner.cpp b/sane/scanner.cpp index c7a181c..0457d00 100644 --- a/sane/scanner.cpp +++ b/sane/scanner.cpp @@ -2904,11 +2904,11 @@ COM_API_IMPLEMENT(scanner, bool, ui_show_main(HWND parent)) COM_API_IMPLEMENT(scanner, bool, ui_show_setting(HWND parent, bool with_scan, bool indicator)) { is_show_ui_ = with_scan; + events_.clear(); if (callback::show_setting_ui) { if (with_scan) { - events_.clear(); images_.clear(); scan_msg_ = "OK"; scan_err_ = false; diff --git a/twain/twain/huagaods.cpp b/twain/twain/huagaods.cpp index ab38b02..49deed6 100644 --- a/twain/twain/huagaods.cpp +++ b/twain/twain/huagaods.cpp @@ -3456,8 +3456,8 @@ int huagao_ds::handle_scanner_event(int ev, bool from_event_proc) //notifyCloseOk(); //break; case SANE_EVENT_UI_CLOSE_SETTING: - notifyCloseCancel(); - if (ev == SANE_EVENT_UI_CLOSE_SETTING) + rc = notifyCloseCancel(); + if (!Twpp::success(rc)) { rc = notifyXferReady(); // 好分数需要再通知 FAINT :( - modified on 2022-10-20 if (!Twpp::success(rc)) @@ -3466,6 +3466,7 @@ int huagao_ds::handle_scanner_event(int ev, bool from_event_proc) swprintf_s(msg, _countof(msg) - 1, L"[%x]yscan: notifyXferReady failed after setting UI closed with error %d\r\n", GetCurrentThreadId(), rc); load_sane_util::log_info(msg, 0); } + rc = notifyCloseCancel(); } break; case SANE_EVENT_UI_SCAN_COMMAND: