IAutomaticBorderDetection协议映射为匹配原始尺寸
This commit is contained in:
parent
66b6243ff2
commit
56146725d6
|
@ -2576,13 +2576,13 @@ void huagao_ds::init_support_caps(void)
|
|||
if (Msg::Set == msg) {
|
||||
auto autodetectborder = data.currentItem<CapType::IAutomaticBorderDetection>();
|
||||
int ret = SCANNER_ERR_OK;
|
||||
SET_SANE_OPT_EX(ret, scanner_, is_size_check, (bool*)&autodetectborder);
|
||||
SET_SANE_OPT_EX(ret, scanner_, ex_auto_paper_size, (bool*)&autodetectborder);
|
||||
return ret == SCANNER_ERR_OK ? success() : badValue();
|
||||
}
|
||||
Bool init = false,
|
||||
erase = false;
|
||||
std::vector<bool> all;
|
||||
GET_SANE_OPT_EX(bool, scanner_, is_size_check, NULL, &all);
|
||||
GET_SANE_OPT_EX(bool, scanner_, ex_auto_paper_size, NULL, &all);
|
||||
init = (bool)all[sane_opts::RANGE_POS_DEFAULT];
|
||||
erase = (bool)all[sane_opts::RANGE_POS_CURRENT];
|
||||
return CapSupGetAllReset<Bool, Bool, CapType::IAutomaticBorderDetection>(msg, data, { false,true }, erase, init, erase ? 1 : 0, 0);
|
||||
|
|
Loading…
Reference in New Issue