fix: 修复部分模拟器行尾变化的问题

fix https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/1719
This commit is contained in:
zzyyyl
2022-09-01 16:35:36 +08:00
parent 8410a7bfac
commit 0a3358fb95
2 changed files with 5 additions and 2 deletions

View File

@@ -741,7 +741,8 @@ bool asst::Controller::screencap(const std::string& cmd, const DecodeFunc& decod
else {
Log.info("data is not empty, but image is empty");
if (m_adb.screencap_end_of_line == AdbProperty::ScreencapEndOfLine::UnknownYet) {
if (m_adb.screencap_end_of_line == AdbProperty::ScreencapEndOfLine::UnknownYet ||
m_adb.screencap_end_of_line == AdbProperty::ScreencapEndOfLine::LF) {
Log.info("try to cvt lf");
convert_lf(data);
@@ -754,6 +755,7 @@ bool asst::Controller::screencap(const std::string& cmd, const DecodeFunc& decod
Log.error("convert lf and retry decode failed!");
}
}
m_adb.screencap_end_of_line = AdbProperty::ScreencapEndOfLine::UnknownYet;
return false;
}
}