NUM_InputDevice

This commit is contained in:
Glenn Maynard
2006-09-26 21:08:50 +00:00
parent 0b7b6b6f9f
commit 361f8f4e01
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -120,7 +120,7 @@ void InputFilter::ButtonPressed( const DeviceInput &di, bool Down )
if( di.ts.IsZero() )
LOG->Warn( "InputFilter::ButtonPressed: zero timestamp is invalid" );
ASSERT_M( di.device < NUM_INPUT_DEVICES, ssprintf("%i", di.device) );
ASSERT_M( di.device < NUM_InputDevice, ssprintf("%i", di.device) );
ASSERT_M( di.button < NUM_DeviceButton, ssprintf("%i", di.button) );
ButtonState &bs = GetButtonState( di );
+1 -1
View File
@@ -211,7 +211,7 @@ static const char *InputDeviceNames[] = {
"Pump2",
"Midi",
};
XToString( InputDevice, NUM_INPUT_DEVICES );
XToString( InputDevice, NUM_InputDevice );
StringToX( InputDevice );
/* Return a reversible representation of a DeviceInput. This is not affected by InputDrivers,
+2 -2
View File
@@ -46,10 +46,10 @@ enum InputDevice
DEVICE_PUMP1,
DEVICE_PUMP2,
DEVICE_MIDI,
NUM_INPUT_DEVICES, // leave this at the end
NUM_InputDevice, // leave this at the end
DEVICE_NONE // means this is NULL
};
#define FOREACH_InputDevice( i ) FOREACH_ENUM( InputDevice, NUM_INPUT_DEVICES, i )
#define FOREACH_InputDevice( i ) FOREACH_ENUM( InputDevice, NUM_InputDevice, i )
const RString& InputDeviceToString( InputDevice i );
InputDevice StringToInputDevice( const RString& s );
inline bool IsJoystick( InputDevice id ) { return DEVICE_JOY1 <= id && id < DEVICE_JOY1+NUM_JOYSTICKS; }