aboutsummaryrefslogtreecommitdiff
path: root/backends/events/sdl
diff options
context:
space:
mode:
authorBastien Bouclet2017-12-19 06:26:47 +0100
committerBastien Bouclet2017-12-26 21:11:04 +0100
commitee4ff8ca08faf2bfbc14fe4a905b311d48049cf6 (patch)
tree20bcd91fad47bf8868c3f3a14e39f6b21a962e1f /backends/events/sdl
parent1fb748e97480dc64ed27ebe75490c1b938cdbed4 (diff)
downloadscummvm-rg350-ee4ff8ca08faf2bfbc14fe4a905b311d48049cf6.tar.gz
scummvm-rg350-ee4ff8ca08faf2bfbc14fe4a905b311d48049cf6.tar.bz2
scummvm-rg350-ee4ff8ca08faf2bfbc14fe4a905b311d48049cf6.zip
SDL: Cleanup joystick deadzone handling
Diffstat (limited to 'backends/events/sdl')
-rw-r--r--backends/events/sdl/sdl-events.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp
index 6d48b8d372..d4e8956366 100644
--- a/backends/events/sdl/sdl-events.cpp
+++ b/backends/events/sdl/sdl-events.cpp
@@ -32,7 +32,6 @@
// FIXME move joystick defines out and replace with confile file options
// we should really allow users to map any key to a joystick button
-#define JOY_DEADZONE 3200
// #define JOY_INVERT_Y
#define JOY_XAXIS 0
@@ -1022,9 +1021,7 @@ bool SdlEventSource::handleAxisToMouseMotion(int16 xAxis, int16 yAxis) {
float analogX = (float)xAxis;
float analogY = (float)yAxis;
- float deadZone = (float)JOY_DEADZONE;
- if (g_system->hasFeature(OSystem::kFeatureJoystickDeadzone))
- deadZone = (float)ConfMan.getInt("joystick_deadzone") * 1000.0f;
+ float deadZone = (float)ConfMan.getInt("joystick_deadzone") * 1000.0f;
float magnitude = sqrt(analogX * analogX + analogY * analogY);