调整扩展属性重用设置

This commit is contained in:
gb 2022-06-15 17:22:10 +08:00
parent 1205559eaf
commit 8da59821bd
2 changed files with 5 additions and 8 deletions

View File

@ -18,7 +18,6 @@ static IMPLEMENT_OPTION_STRING_COMPARE(compare_sane_opt);
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// class scanner
scanner::scanner(SCANNERID id) : handle_(NULL), id_(id), ex_id_(EXTENSION_ID_BASE), prev_start_result_(SCANNER_ERR_NOT_START)

View File

@ -2140,14 +2140,12 @@ void huagao_ds::init_support_caps(void)
return success(); // CapSupGetAll<Str255, Str255, (CapType)CapTypeEx::CAP_TYPE_EX_IP>(msg, data, str, str);
};
#define SET_EXISTING_EXTENSION(scan_ind, cap) \
op_ind = scanner_->sane_opt_id_##scan_ind();\
if(op_ind != -1) \
#define SET_EXISTING_EXTENSION(name, cap) \
if(m_query.count((CapType)CAP_EX_SANE_##name)) \
{ \
m_query[(CapType)cap] = msgSupportGetAllSetReset; \
m_caps[(CapType)cap] = m_caps[CapType((int)CAP_EX_SANE_##scan_ind)]; \
m_query[(CapType)cap] = m_query[(CapType)CAP_EX_SANE_##name]; \
m_caps[(CapType)cap] = m_caps[CapType((int)CAP_EX_SANE_##name)]; \
}
int op_ind = -1;
SET_EXISTING_EXTENSION(is_swap, CapTypeEx::CAP_TYPE_EX_FLIP);
SET_EXISTING_EXTENSION(is_rotate_bkg180, CapTypeEx::CAP_TYPE_EX_ROTATE_BKG_180);