Don't hard code joystick and pump numbers.

This commit is contained in:
Steve Checkoway
2006-09-14 06:06:53 +00:00
parent b30cc9d9d1
commit 4dd57b99bd
@@ -158,9 +158,9 @@ static HIDDevice *MakeDevice( InputDevice id )
{
if( id == DEVICE_KEYBOARD )
return new KeyboardDevice;
if( id <= DEVICE_JOY16 )
if( IsJoystick(id) )
return new JoystickDevice;
if( id <= DEVICE_PUMP2 )
if( IsPump(id) )
return new PumpDevice;
return NULL;
}