From 2193e5aec668bea5b5a78c63d73944fb865ec79b Mon Sep 17 00:00:00 2001 From: mattmenke Date: Fri, 25 Sep 2009 19:34:59 +0000 Subject: [PATCH] LilyPad: Fix for non-pressure sensitive buttons with dead zone < 0.0625 or so. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1918 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/LilyPad/Config.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins/LilyPad/Config.cpp b/plugins/LilyPad/Config.cpp index 3c31bffb79..eb49e8e3ce 100644 --- a/plugins/LilyPad/Config.cpp +++ b/plugins/LilyPad/Config.cpp @@ -606,7 +606,9 @@ void ChangeValue(int port, int slot, int *newSensitivity, int *newTurbo, int *ne b->sensitivity = *newSensitivity; } if (newDeadZone) { - b->deadZone = *newDeadZone; + if (b->deadZone) { + b->deadZone = *newDeadZone; + } } if (newTurbo) { b->turbo = *newTurbo; @@ -1143,12 +1145,15 @@ int BindCommand(Device *dev, unsigned int uid, unsigned int port, unsigned int s return -1; } if (!sensitivity) sensitivity = BASE_SENSITIVITY; + if ((uid>>16) & (PSHBTN|TGLBTN)) { + deadZone = 0; + } else if (!deadZone) { - if (dev->api != DS3 || !((uid>>16) & PRESSURE_BTN)) { - deadZone = DEFAULT_DEADZONE; + if ((uid>>16) & PRESSURE_BTN) { + deadZone = 1; } else { - deadZone = 1; + deadZone = DEFAULT_DEADZONE; } } // Relative axes can have negative sensitivity.