From 6c1d59fef6d5f3507d9fe84d74f22e9967695b29 Mon Sep 17 00:00:00 2001 From: mcmartin Date: Mon, 14 Jan 2008 15:24:48 +0000 Subject: [PATCH] Joystick threshold defaults to 10000, not 0 Fixes Bug #1046. Ideally, one could configure the threshold, but in practice if 10000 doesn't work it's an SDL bug. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2906 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 1 + sc2/src/sc2code/libs/input/sdl/vcontrol.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 8e854ea5a..e96334e2e 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Joystick threshold defaults to 10,000, not 0 (Bug #1046) - Michael - Remove MEM_HANDLEs from everywhere outside of memlib - Michael - Split out RESOURCEs from the loaded data in RACE_DESC and LOCDATA structures - Michael diff --git a/sc2/src/sc2code/libs/input/sdl/vcontrol.c b/sc2/src/sc2code/libs/input/sdl/vcontrol.c index 144ca932b..4dc0b4120 100644 --- a/sc2/src/sc2code/libs/input/sdl/vcontrol.c +++ b/sc2/src/sc2code/libs/input/sdl/vcontrol.c @@ -204,6 +204,7 @@ key_init (void) joysticks[i].numaxes = joysticks[i].numbuttons = 0; joysticks[i].axes = NULL; joysticks[i].buttons = NULL; + joysticks[i].threshold = 10000; } } else @@ -212,6 +213,7 @@ key_init (void) } #else joycount = 0; + joysticks = NULL; #endif /* HAVE_JOYSTICK */ }