mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 18:20:39 +08:00
chore: 不再支持非 16:9 分辨率
This commit is contained in:
@@ -1086,6 +1086,13 @@ bool asst::Controller::connect(const std::string& adb_path, const std::string& a
|
||||
m_callback(AsstMsg::ConnectionInfo, info, m_callback_arg);
|
||||
return false;
|
||||
}
|
||||
else if (std::fabs(static_cast<double>(WindowWidthDefault) / static_cast<double>(WindowHeightDefault)
|
||||
- static_cast<double>(m_width) / static_cast<double>(m_height)) > 0.1) {
|
||||
info["what"] = "UnsupportedResolution";
|
||||
info["why"] = "Not 16:9";
|
||||
m_callback(AsstMsg::ConnectionInfo, info, m_callback_arg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* calc ratio */
|
||||
@@ -1182,7 +1189,7 @@ bool asst::Controller::release()
|
||||
{
|
||||
return call_command(m_adb.release).has_value();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool asst::Controller::inited() const noexcept
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user