chore: 不再支持非 16:9 分辨率

This commit is contained in:
MistEO
2022-06-26 20:14:57 +08:00
parent 5ab91c77b7
commit 210f1abea9
2 changed files with 9 additions and 2 deletions

View File

@@ -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
{