mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 17:57:01 +08:00
chore.增加了一个分辨率获取错误的报错
This commit is contained in:
@@ -974,7 +974,13 @@ bool asst::Controller::connect(const std::string& adb_path, const std::string& a
|
||||
|
||||
m_callback(AsstMsg::ConnectionInfo, info, m_callback_arg);
|
||||
|
||||
if (m_width < WindowWidthDefault || m_height < WindowHeightDefault) {
|
||||
if (m_width == 0 || m_height == 0) {
|
||||
info["what"] = "ResolutionError";
|
||||
info["why"] = "Get resolution failed";
|
||||
m_callback(AsstMsg::ConnectionInfo, info, m_callback_arg);
|
||||
return false;
|
||||
}
|
||||
else if (m_width < WindowWidthDefault || m_height < WindowHeightDefault) {
|
||||
info["what"] = "UnsupportedResolution";
|
||||
info["why"] = "Low screen resolution";
|
||||
m_callback(AsstMsg::ConnectionInfo, info, m_callback_arg);
|
||||
@@ -1062,7 +1068,7 @@ bool asst::Controller::release()
|
||||
{
|
||||
return call_command(m_adb.release).has_value();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const std::string& asst::Controller::get_uuid() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user