国产系统解决点击取消扫描会报io错误的问题;BUG-903
This commit is contained in:
parent
02e9a54029
commit
bbbdaf1c29
|
@ -183,6 +183,13 @@ hg_scanner::hg_scanner(ScannerSerial serial, const char* dev_name, usb_io* io, i
|
||||||
if (hg_log::ini_get("func", "no-paper-chk") == "1")
|
if (hg_log::ini_get("func", "no-paper-chk") == "1")
|
||||||
no_paper_check_ = true;
|
no_paper_check_ = true;
|
||||||
|
|
||||||
|
std::string CurExe_path("");
|
||||||
|
std::string oem_name(PRODUCT_VENDOR);
|
||||||
|
hg_log::pe_path(&CurExe_path);
|
||||||
|
std::transform(CurExe_path.begin(), CurExe_path.end(), CurExe_path.begin(), ::toupper);
|
||||||
|
std::transform(oem_name.begin(), oem_name.end(), oem_name.begin(), ::toupper);
|
||||||
|
is_hg_app_ = CurExe_path.find(oem_name) != std::string::npos;
|
||||||
|
|
||||||
std::string mem = hg_log::ini_get("mem", "max_img");
|
std::string mem = hg_log::ini_get("mem", "max_img");
|
||||||
if (!mem.empty())
|
if (!mem.empty())
|
||||||
{
|
{
|
||||||
|
@ -4324,7 +4331,7 @@ int hg_scanner::get_image_info(SANE_Parameters* ii, int len)
|
||||||
this_thread::sleep_for(chrono::milliseconds(10));
|
this_thread::sleep_for(chrono::milliseconds(10));
|
||||||
|
|
||||||
if (final_imgs_.size() <= 0
|
if (final_imgs_.size() <= 0
|
||||||
|| user_cancel_) // for BUG-891 !!!
|
|| (user_cancel_ && !is_hg_app_)) // for BUG-891 !!! //2024-02-07, add "is_hg_app_", for BUG-903
|
||||||
{
|
{
|
||||||
ret = SCANNER_ERR_NO_DATA;
|
ret = SCANNER_ERR_NO_DATA;
|
||||||
if(user_cancel_ && final_imgs_.size())
|
if(user_cancel_ && final_imgs_.size())
|
||||||
|
|
|
@ -290,6 +290,7 @@ protected:
|
||||||
volatile bool run_;
|
volatile bool run_;
|
||||||
volatile bool is_read_int;
|
volatile bool is_read_int;
|
||||||
volatile bool user_cancel_;
|
volatile bool user_cancel_;
|
||||||
|
bool is_hg_app_ = true;
|
||||||
platform_event wait_usb_;
|
platform_event wait_usb_;
|
||||||
platform_event wait_img_;
|
platform_event wait_img_;
|
||||||
platform_event wait_usb_result_;
|
platform_event wait_usb_result_;
|
||||||
|
|
Loading…
Reference in New Issue