From 73a3e9d5bb3a12812926b487a17c36dd4381ebc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Thu, 8 Oct 2020 21:46:00 +0300 Subject: Fixes, some thanks to ASan --- src/core/Pad.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/Pad.cpp') diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp index aa6e5cc8..b723eb1d 100644 --- a/src/core/Pad.cpp +++ b/src/core/Pad.cpp @@ -3209,7 +3209,7 @@ int16 CPad::SniperModeLookLeftRight(void) if ( Abs(axis) > Abs(dpad) ) { if ( Abs(axis) > 35.0f ) { - return (axis > 0.f ? axis - 35.f : axis + 35.f) * 1.3763441f; + return (axis > 0.f ? axis - 35.f : axis + 35.f) * (128.f / (128 - 35)); } else { return 0; } @@ -3231,7 +3231,7 @@ int16 CPad::SniperModeLookUpDown(void) if ( Abs(axis) > Abs(dpad) ) { if ( Abs(axis) > 35.0f ) { - return (axis > 0.f ? axis - 35.f : axis + 35.f) * 1.3763441f; + return (axis > 0.f ? axis - 35.f : axis + 35.f) * (128.f / (128 - 35)); } else { return 0; } @@ -3573,4 +3573,4 @@ void CPad::FixPadsAfterSave(void) bObsoleteControllerMessage = false; GetPad(0)->Phase = 0; } -} \ No newline at end of file +} -- cgit v1.2.3