diff --git a/twain/twain/huagaods.cpp b/twain/twain/huagaods.cpp index fc5123b..6b5d1df 100644 --- a/twain/twain/huagaods.cpp +++ b/twain/twain/huagaods.cpp @@ -1828,7 +1828,7 @@ void huagao_ds::init_support_caps(void) if (Msg::Set == msg) { auto show = data.currentItem(); m_bIndicator = show; - load_sane_util::log_info(m_bIndicator ? L"Set show indicator: true\r\n" : L"Set show indicator: false\r\n", 0); + load_sane_util::log_info(m_bIndicator ? L"Set show indicator: true\r\n" : L"Set show indicator: false\r\n", 1); return success(); } // data.type @@ -1876,7 +1876,7 @@ void huagao_ds::init_support_caps(void) { wchar_t info[128] = { 0 }; swprintf_s(info, _countof(info) - 1, L"set CapType::ICompression = %s\r\n", Compression::None == mech ? L"None" : L"Group4"); - load_sane_util::log_info(info, 0); + load_sane_util::log_info(info, 1); } return success(); } @@ -1953,7 +1953,7 @@ void huagao_ds::init_support_caps(void) { wchar_t info[128] = { 0 }; swprintf_s(info, _countof(info) - 1, L"set CapType::IBitDepth = %d\r\n", val); - load_sane_util::log_info(info, 0); + load_sane_util::log_info(info, 1); } SET_SANE_OPT_EX(ret, scanner_, ex_color_mode, &val); if (Msg::Reset == msg) @@ -2144,7 +2144,7 @@ void huagao_ds::init_support_caps(void) { wchar_t info[128] = { 0 }, * des[] = {L"Native", L"File", L"Memory"}; swprintf_s(info, _countof(info) - 1, L"set CapType::IXferMech = %s\r\n", des[(int)m_capXferMech]); - load_sane_util::log_info(info, 0); + load_sane_util::log_info(info, 1); } return success(); } @@ -2176,7 +2176,7 @@ void huagao_ds::init_support_caps(void) swprintf_s(info, _countof(info) - 1, L"set CapType::IPixelType = %s\r\n", des[(int)init]); else swprintf_s(info, _countof(info) - 1, L"set CapType::IPixelType = 0x%x\r\n", (int)init); - load_sane_util::log_info(info, 0); + load_sane_util::log_info(info, 1); } int ret = SCANNER_ERR_OK; SET_SANE_OPT_EX(ret, scanner_, ex_color_mode, &init); @@ -2356,7 +2356,7 @@ void huagao_ds::init_support_caps(void) GET_SANE_OPT_EX(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); + load_sane_util::log_info(dup ? L"Get Duplex is: true\r\n" : L"Get Duplex is: false\r\n", 1); int ret = SCANNER_ERR_OK; int count = count_; @@ -2401,11 +2401,11 @@ void huagao_ds::init_support_caps(void) init.img_format = (SANE_ImageType)fmt; { if (fmt == Twpp::ImageFileFormat::Bmp) - load_sane_util::log_info(L"set CapType::IImageFileFormat = Bmp\r\n", 0); + load_sane_util::log_info(L"set CapType::IImageFileFormat = Bmp\r\n", 1); else if (fmt == Twpp::ImageFileFormat::Jfif) - load_sane_util::log_info(L"set CapType::IImageFileFormat = Jfif\r\n", 0); + load_sane_util::log_info(L"set CapType::IImageFileFormat = Jfif\r\n", 1); else if (fmt == Twpp::ImageFileFormat::Tiff) - load_sane_util::log_info(L"set CapType::IImageFileFormat = Tiff\r\n", 0); + load_sane_util::log_info(L"set CapType::IImageFileFormat = Tiff\r\n", 1); } } else @@ -2427,10 +2427,10 @@ void huagao_ds::init_support_caps(void) for (size_t ind = sane_opts::RANGE_POS_ENUM_BEGIN; ind < all.size(); ++ind) { vals.push_back((ImageFileFormat)(int)all[ind].img_format); - if (all[ind].img_format == init.img_format) - i = ind; - else if (all[ind].img_format == now.img_format) - n = ind; + if ((int)all[ind].img_format == (int)Init) // init.img_format) + i = ind - sane_opts::RANGE_POS_ENUM_BEGIN; + else if ((int)all[ind].img_format == (int)Now) //now.img_format) + n = ind - sane_opts::RANGE_POS_ENUM_BEGIN; } return cap_get_enum_values(msg, data, vals, Now, Init, n, i); @@ -2781,7 +2781,7 @@ void huagao_ds::init_support_caps(void) if (double_check_mode_ == DOUBLE_CHECK_ULTRASONIC) { enable = (bool)val; - load_sane_util::to_log(1, L"DoubleFeedDetection parameter is for boolean of Ultrasonic. set to %s\r\n", enable ? L"TRUE" : L"FALSE"); + load_sane_util::to_log(1, L"DoubleFeedDetection parameter is boolean for Ultrasonic. set to %s\r\n", enable ? L"TRUE" : L"FALSE"); } SET_SANE_OPT_EX(ret, scanner_, is_ultrasonic_check, &enable); return ret == SCANNER_ERR_OK ? success() : seqError();