Fix probable bug in deadzone calculation etc for onscreen dpad. May help #6585

The bug would manifest itself on large or small "scale" values.
This commit is contained in:
Henrik Rydgard 2014-07-21 01:22:21 +02:00
parent 0761d1eb77
commit f9cedbbc03

View File

@ -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;