mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 02:55:38 +08:00
fix.帮雷电模拟器修复截图错误的bug
This commit is contained in:
@@ -554,9 +554,15 @@ int asst::Controller::swipe_without_scale(const Rect& r1, const Rect& r2, int du
|
||||
|
||||
cv::Mat asst::Controller::get_image(bool raw)
|
||||
{
|
||||
static bool has_successful = false;
|
||||
if (!screencap()) {
|
||||
return cv::Mat();
|
||||
// 如果之前成功截图过,这次没成功可能是一次意外,重试一次
|
||||
// 点名批评雷电模拟器!
|
||||
if (!(has_successful && screencap())) {
|
||||
return cv::Mat();
|
||||
}
|
||||
}
|
||||
has_successful = true;
|
||||
//std::shared_lock<std::shared_mutex> image_lock(m_image_mutex);
|
||||
if (raw) {
|
||||
return m_cache_image;
|
||||
|
||||
Reference in New Issue
Block a user