From 07b6aa099b7e06f0c8ed82903e7caf05fa620dca Mon Sep 17 00:00:00 2001 From: TrueZhuanjia Date: Sun, 6 Jul 2025 23:38:00 +0800 Subject: [PATCH] remove useless code --- VoidLink/Input/ControllerSupport.h | 1 - VoidLink/Input/ControllerSupport.m | 8 -------- VoidLink/ViewControllers/StreamFrameViewController.m | 5 ----- 3 files changed, 14 deletions(-) diff --git a/VoidLink/Input/ControllerSupport.h b/VoidLink/Input/ControllerSupport.h index 324372b3..6a26b31f 100644 --- a/VoidLink/Input/ControllerSupport.h +++ b/VoidLink/Input/ControllerSupport.h @@ -16,7 +16,6 @@ - (void)gamepadPresenceChanged; - (void)mousePresenceChanged; - (void)streamExitRequested; -- (void)automaticallyStartSendingGyroEvents; @end diff --git a/VoidLink/Input/ControllerSupport.m b/VoidLink/Input/ControllerSupport.m index 40d93286..902de4f5 100644 --- a/VoidLink/Input/ControllerSupport.m +++ b/VoidLink/Input/ControllerSupport.m @@ -1379,13 +1379,6 @@ static const double MOUSE_SPEED_DIVISOR = 1.25; for(VoidController* controller in _voidControllers.allValues) [self updateTimerStateForController:controller]; break; } - if(_gyroMode != GyroModeOff){ - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), - dispatch_get_main_queue(), ^{ - - // [self->_delegate automaticallyStartSendingGyroEvents]; // this will discontine any control events sent to the remote side for a instant. anyway it works out as signature describes - }); - } } @@ -1577,7 +1570,6 @@ static const double MOUSE_SPEED_DIVISOR = 1.25; [self updateFinished:self->_oscController]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - //[self->_delegate automaticallyStartSendingGyroEvents]; // this will discontine any control events sent to the remote side for a instant. anyway it works out as signature describes [self updateTimerStateForController:self->_oscController]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), diff --git a/VoidLink/ViewControllers/StreamFrameViewController.m b/VoidLink/ViewControllers/StreamFrameViewController.m index 4d30ab76..635ec838 100644 --- a/VoidLink/ViewControllers/StreamFrameViewController.m +++ b/VoidLink/ViewControllers/StreamFrameViewController.m @@ -219,11 +219,6 @@ NSLog(@"streamview gestures: %d", (uint32_t)[_streamView.gestureRecognizers count]); } --(void)automaticallyStartSendingGyroEvents{ - [_controllerSupport updateControllerSupport:self.streamConfig delegate:self];// reload controllerSupport obj, this is mandatory for OSC reload,especially when the stream view is launched without OSC -} - - - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated];