foxygit / doom Log in
commit 4d547c03611410f8c6912ad8081a3718f0ad079c
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Mon Apr 28 21:33:21 2014 -0400
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Mon Apr 28 21:33:21 2014 -0400

    joystick: Increase 'dead zone' size.

    The joystick dead zone is the range within which the joystick is
    interpreted as being centered. Increase this range significantly, as
    some controllers (eg. the PS2 controller + USB connector) can be very
    sensitive, leading to the player spinning randomly even when the stick
    is centered.
---
 src/i_joystick.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/i_joystick.c b/src/i_joystick.c
index d61d6260..c363cfaa 100644
--- a/src/i_joystick.c
+++ b/src/i_joystick.c
@@ -41,7 +41,7 @@
 // When an axis is within the dead zone, it is set to zero.
 // This is 5% of the full range:

-#define DEAD_ZONE (32768 / 20)
+#define DEAD_ZONE (32768 / 3)

 static SDL_Joystick *joystick = NULL;