From eb064ebe06290825ebbab15f62f1395fa3d3058a Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Wed, 13 Oct 2010 20:07:16 +0000 Subject: [PATCH] - Fixed crash with joysticks with more than 5 axes. SVN r2941 (trunk) --- src/sdl/i_joystick.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sdl/i_joystick.cpp b/src/sdl/i_joystick.cpp index d7e81d70da..79aa9e91f9 100644 --- a/src/sdl/i_joystick.cpp +++ b/src/sdl/i_joystick.cpp @@ -117,7 +117,8 @@ public: // Add to game axes. for (int i = 0; i < GetNumAxes(); ++i) { - axes[Axes[i].GameAxis] -= float(((double)SDL_JoystickGetAxis(Device, i)/32768.0) * Multiplier * Axes[i].Multiplier); + if(Axes[i].GameAxis != JOYAXIS_None) + axes[Axes[i].GameAxis] -= float(((double)SDL_JoystickGetAxis(Device, i)/32768.0) * Multiplier * Axes[i].Multiplier); } }