From d4f8a41ff2920e146d00e2fa731506c4875738b3 Mon Sep 17 00:00:00 2001 From: Bryce Hackel <34104885+bhackel@users.noreply.github.com> Date: Sun, 1 Sep 2024 13:10:51 -0700 Subject: [PATCH] Fix smoothing for player gestures --- YTLitePlus.xm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/YTLitePlus.xm b/YTLitePlus.xm index aa57691..bfc82c8 100644 --- a/YTLitePlus.xm +++ b/YTLitePlus.xm @@ -689,7 +689,7 @@ BOOL isTabSelected = NO; // Variable used to smooth out the X translation static CGFloat smoothedTranslationX = 0; // Constant for the filter constant to change responsiveness - static const CGFloat filterConstant = 0.1; + // static const CGFloat filterConstant = 0.1; // Constant for the deadzone radius that can be changed in the settings static CGFloat deadzoneRadius = (CGFloat)GetFloat(@"playerGesturesDeadzone"); // Constant for the sensitivity factor that can be changed in the settings @@ -756,10 +756,10 @@ BOOL isTabSelected = NO; }; // Helper function to smooth out the X translation - CGFloat (^applyLowPassFilter)(CGFloat) = ^(CGFloat newTranslation) { - smoothedTranslationX = filterConstant * newTranslation + (1 - filterConstant) * smoothedTranslationX; - return smoothedTranslationX; - }; + // CGFloat (^applyLowPassFilter)(CGFloat) = ^(CGFloat newTranslation) { + // smoothedTranslationX = filterConstant * newTranslation + (1 - filterConstant) * smoothedTranslationX; + // return smoothedTranslationX; + // }; /***** Helper functions for running the selected gesture *****/ // Helper function to run any setup for the selected gesture mode @@ -923,7 +923,7 @@ BOOL isTabSelected = NO; // Adjust the X translation based on the value hit after exiting the deadzone adjustedTranslationX = translation.x - deadzoneStartingXTranslation; // Smooth the translation value - adjustedTranslationX = applyLowPassFilter(adjustedTranslationX); + // adjustedTranslationX = applyLowPassFilter(adjustedTranslationX); // Pass the adjusted translation to the selected gesture switch (gestureSection) { case GestureSectionTop: