NUM_InputDevice
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user