From 99a2a4ca1ac8305168a650650b7f90220860b746 Mon Sep 17 00:00:00 2001 From: TrueZhuanjia Date: Sat, 4 Oct 2025 17:22:32 +0800 Subject: [PATCH] minor fixes --- VoidLink/Input/MotionHandler.swift | 6 +++--- VoidLink/Input/OnScreenWidgetView.swift | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VoidLink/Input/MotionHandler.swift b/VoidLink/Input/MotionHandler.swift index 88e3faee..33455fb6 100644 --- a/VoidLink/Input/MotionHandler.swift +++ b/VoidLink/Input/MotionHandler.swift @@ -100,7 +100,7 @@ import CoreMotion } @objc public func startAccelUpdate() { - gyroControlStarted = true + accelControlStarted = true if motionManager.isAccelerometerAvailable { motionManager.startAccelerometerUpdates(to: .main) { [weak self] accelData, _ in guard let self = self, let data = accelData else { return } @@ -114,8 +114,8 @@ import CoreMotion /// 停止更新 @objc public func stopGyroUpdate() { gyroControlStarted = false - if motionManager.isAccelerometerActive { - motionManager.stopAccelerometerUpdates() + if motionManager.isGyroActive{ + motionManager.stopGyroUpdates() } self.onScreenControls.clearLeftStickTouchPadFlag() self.onScreenControls.clearRightStickTouchPadFlag() diff --git a/VoidLink/Input/OnScreenWidgetView.swift b/VoidLink/Input/OnScreenWidgetView.swift index 28963db2..cd6cf92d 100644 --- a/VoidLink/Input/OnScreenWidgetView.swift +++ b/VoidLink/Input/OnScreenWidgetView.swift @@ -1681,7 +1681,7 @@ import UIKit self.onScreenControls.clearLeftStickTouchPadFlag() } else{ - self.mixInputDelegate?.mixRightStickAndGyroInput(x: 0, y: 0) + self.mixInputDelegate?.mixLeftStickAndGyroInput(x: 0, y: 0) } }