EnableUiOnly增加返回设备不在线的错误码

This commit is contained in:
gb 2023-06-12 11:13:36 +08:00
parent 0a808cc59c
commit ecc89ef2b3
1 changed files with 3 additions and 0 deletions

View File

@ -1723,6 +1723,9 @@ Result huagao_ds::capCommon(const Identity&, Msg msg, Capability& data) {
} }
Twpp::Result huagao_ds::showTwainUI(Twpp::UserInterface& data, bool bUiOnly) Twpp::Result huagao_ds::showTwainUI(Twpp::UserInterface& data, bool bUiOnly)
{ {
if (!scanner_->is_online())
return { ReturnCode::Failure, huagao_ds::condition_code_from_hg_error(SCANNER_ERR_DEVICE_NOT_FOUND) };
show_setting_ = true; show_setting_ = true;
bUiOnly_ = bUiOnly; bUiOnly_ = bUiOnly;
// display user UI ... (setting UI, can we show my own main window here ?) // display user UI ... (setting UI, can we show my own main window here ?)