feat: 新增仅MaaTouch支持的暂停下干员优化。下的更快!

This commit is contained in:
MistEO
2022-12-05 01:17:28 +08:00
parent 192b4e759c
commit 2678758d70
6 changed files with 48 additions and 14 deletions

View File

@@ -1186,7 +1186,14 @@ bool asst::Controller::swipe_without_scale(const Point& p1, const Point& p2, int
if (need_pause && std::sqrt(std::pow(cur_x - _x1, 2) + std::pow(cur_y - _y1, 2)) >
opt.swipe_with_pause_required_distance) {
need_pause = false;
pause_future = std::async(std::launch::async, [&]() { press_esc(); });
if (m_use_maa_touch) {
constexpr int EscKeyCode = 111;
toucher.key_down(EscKeyCode);
toucher.key_up(EscKeyCode, 0);
}
else {
pause_future = std::async(std::launch::async, [&]() { press_esc(); });
}
}
if (cur_x < 0 || cur_x > m_minitouch_props.max_x || cur_y < 0 || cur_y > m_minitouch_props.max_y) {
continue;