- Fixed crash with joysticks with more than 5 axes.

SVN r2941 (trunk)
This commit is contained in:
Braden Obrzut 2010-10-13 20:07:16 +00:00
parent 78cfbe56a1
commit eb064ebe06

View file

@ -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);
}
}