From 93bbb0ba4b9d3e15997d0fbb643ee4d588890cbf Mon Sep 17 00:00:00 2001 From: Constrat <56174894+Constrat@users.noreply.github.com> Date: Fri, 26 Sep 2025 21:54:06 +0200 Subject: [PATCH] fix: clang --- src/MaaCore/Controller/ControlScaleProxy.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/MaaCore/Controller/ControlScaleProxy.cpp b/src/MaaCore/Controller/ControlScaleProxy.cpp index 00329922e5..a99d08de32 100644 --- a/src/MaaCore/Controller/ControlScaleProxy.cpp +++ b/src/MaaCore/Controller/ControlScaleProxy.cpp @@ -118,15 +118,19 @@ bool asst::ControlScaleProxy::swipe( bool precise1 = (r1.width == 1 && r1.height == 1); bool precise2 = (r2.width == 1 && r2.height == 1); - if (precise1) + if (precise1) { rand_p1 = Point(r1.x, r1.y); - else + } + else { rand_p1 = rand_point_in_rect(r1); + } - if (precise2) + if (precise2) { rand_p2 = Point(r2.x, r2.y); - else + } + else { rand_p2 = rand_point_in_rect(r2); + } if (m_controller_type == ControllerType::Adb && !(precise1 && precise2)) { // 只有不是精确点时才做ADB修正