From f9cedbbc03d3abb5b8c4e99d182da02e32374a43 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Mon, 21 Jul 2014 01:22:21 +0200 Subject: [PATCH] Fix probable bug in deadzone calculation etc for onscreen dpad. May help #6585 The bug would manifest itself on large or small "scale" values. --- UI/GamepadEmu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/GamepadEmu.cpp b/UI/GamepadEmu.cpp index 11dac31c05..1f0df4117f 100644 --- a/UI/GamepadEmu.cpp +++ b/UI/GamepadEmu.cpp @@ -136,7 +136,7 @@ void PSPDpad::Touch(const TouchInput &input) { void PSPDpad::ProcessTouch(float x, float y, bool down) { float stick_size = spacing_ * D_pad_Radius * scale_; - float inv_stick_size = 1.0f / (stick_size * scale_); + float inv_stick_size = 1.0f / stick_size; const float deadzone = 0.17f; float dx = (x - bounds_.centerX()) * inv_stick_size;