From 6878bbbb170bc0acfd50ade7f10f53e2c260d31b Mon Sep 17 00:00:00 2001 From: MistEO Date: Sun, 21 May 2023 09:48:15 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=BA=9Bad?= =?UTF-8?q?bSwipeXDistanceMultiplier=E7=9A=84=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaCore/Config/GeneralConfig.cpp | 2 +- src/MaaCore/Controller/ControlScaleProxy.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MaaCore/Config/GeneralConfig.cpp b/src/MaaCore/Config/GeneralConfig.cpp index 3d8ec6687f..bebcff3450 100644 --- a/src/MaaCore/Config/GeneralConfig.cpp +++ b/src/MaaCore/Config/GeneralConfig.cpp @@ -18,7 +18,7 @@ bool asst::GeneralConfig::parse(const json::value& json) m_options.adb_extra_swipe_dist = options_json.get("adbExtraSwipeDist", 100); m_options.adb_extra_swipe_duration = options_json.get("adbExtraSwipeDuration", -1); m_options.adb_swipe_duration_multiplier = options_json.get("adbSwipeDurationMultiplier", 10.0); - m_options.adb_swipe_x_distance_multiplier = options_json.get("adbSwipeXDistanceMultiplier", 10.0); + m_options.adb_swipe_x_distance_multiplier = options_json.get("adbSwipeXDistanceMultiplier", 0.8); m_options.minitouch_extra_swipe_dist = options_json.get("minitouchExtraSwipeDist", 100); m_options.minitouch_extra_swipe_duration = options_json.get("minitouchExtraSwipeDuration", -1); m_options.minitouch_swipe_default_duration = options_json.get("minitouchSwipeDefaultDuration", 200); diff --git a/src/MaaCore/Controller/ControlScaleProxy.cpp b/src/MaaCore/Controller/ControlScaleProxy.cpp index 1b94c1e43b..d127a1ab69 100644 --- a/src/MaaCore/Controller/ControlScaleProxy.cpp +++ b/src/MaaCore/Controller/ControlScaleProxy.cpp @@ -83,6 +83,8 @@ bool asst::ControlScaleProxy::swipe(const Rect& r1, const Rect& r2, int duration if (m_controller_type == ControllerType::Adb) { // 同样的参数 ADB 总是划过头,糊点屎进来 + // 外部调用 swipe(Point, Point) 时,说明是精确要求位置的,不能做这个调整 + // 所以屎没法糊在下面一层,只能糊在这里了( const auto& opt = Config.get_options(); auto x_dist = rand_p1.x - rand_p2.x; rand_p2.x = rand_p1.x - static_cast(x_dist * opt.adb_swipe_x_distance_multiplier);