fix: 开启 MuMu 截图增强后重启模拟器未重启 MAA 后出现截图失败

fix #10110
This commit is contained in:
uye
2024-08-06 18:34:41 +08:00
parent 0f3e44806c
commit 2cda6f747b
3 changed files with 15 additions and 1 deletions

View File

@@ -558,6 +558,13 @@ bool asst::AdbController::screencap(cv::Mat& image_payload, bool allow_reconnect
case AdbProperty::ScreencapMethod::MumuExtras: {
auto img_opt = m_mumu_extras.screencap();
screencap_ret = img_opt.has_value();
if (!screencap_ret && allow_reconnect) {
m_mumu_extras.reload();
img_opt = m_mumu_extras.screencap();
screencap_ret = img_opt.has_value();
}
if (screencap_ret) {
image_payload = img_opt.value();
}