diff --git a/stepmania/src/InputFilter.cpp b/stepmania/src/InputFilter.cpp index 5f33314e2e..cda7e261e6 100644 --- a/stepmania/src/InputFilter.cpp +++ b/stepmania/src/InputFilter.cpp @@ -226,7 +226,7 @@ void InputFilter::Update( float fDeltaTime ) * things like "key pressed, key release, key repeat". */ LockMut(*queuemutex); - DeviceInput di( DEVICE_NONE, DeviceButton_Invalid, 1.0f, now ); + DeviceInput di( InputDevice_Invalid, DeviceButton_Invalid, 1.0f, now ); vector ButtonsToErase; diff --git a/stepmania/src/InputMapper.cpp b/stepmania/src/InputMapper.cpp index 0bab7edb77..facf9bf46e 100644 --- a/stepmania/src/InputMapper.cpp +++ b/stepmania/src/InputMapper.cpp @@ -758,7 +758,7 @@ bool InputMapper::DeviceToGame( const DeviceInput &DeviceI, GameInput& GameI ) / bool InputMapper::GameToDevice( const GameInput &GameI, int iSlotNum, DeviceInput& DeviceI ) // return true if there is a mapping from pad to device { DeviceI = m_GItoDI[GameI.controller][GameI.button][iSlotNum]; - return DeviceI.device != DEVICE_NONE; + return DeviceI.device != InputDevice_Invalid; } PlayerNumber InputMapper::ControllerToPlayerNumber( GameController controller ) @@ -884,13 +884,13 @@ void InputMapper::ResetKeyRepeat( MenuButton MenuI, PlayerNumber pn ) InputDevice InputMapper::MultiPlayerToInputDevice( MultiPlayer mp ) { if( mp == MultiPlayer_INVALID ) - return DEVICE_NONE; + return InputDevice_Invalid; return enum_add2( DEVICE_JOY1, mp ); } MultiPlayer InputMapper::InputDeviceToMultiPlayer( InputDevice id ) { - if( id == DEVICE_NONE ) + if( id == InputDevice_Invalid ) return MultiPlayer_INVALID; return enum_add2( MultiPlayer_1, id - DEVICE_JOY1 ); } diff --git a/stepmania/src/RageInputDevice.cpp b/stepmania/src/RageInputDevice.cpp index eb38457663..f6413aedd1 100644 --- a/stepmania/src/RageInputDevice.cpp +++ b/stepmania/src/RageInputDevice.cpp @@ -218,7 +218,7 @@ StringToX( InputDevice ); * localization or the keyboard language. */ RString DeviceInput::ToString() const { - if( device == DEVICE_NONE ) + if( device == InputDevice_Invalid ) return RString(); RString s = InputDeviceToString(device) + "_" + DeviceButtonToString(button); @@ -232,7 +232,7 @@ bool DeviceInput::FromString( const RString &s ) if( 2 != sscanf( s, "%31[^_]_%31[^_]", szDevice, szButton ) ) { - device = DEVICE_NONE; + device = InputDevice_Invalid; return false; } diff --git a/stepmania/src/RageInputDevice.h b/stepmania/src/RageInputDevice.h index ff186dd3c3..89e989b0e1 100644 --- a/stepmania/src/RageInputDevice.h +++ b/stepmania/src/RageInputDevice.h @@ -47,7 +47,7 @@ enum InputDevice DEVICE_PUMP2, DEVICE_MIDI, NUM_InputDevice, // leave this at the end - DEVICE_NONE // means this is NULL + InputDevice_Invalid // means this is NULL }; #define FOREACH_InputDevice( i ) FOREACH_ENUM( InputDevice, NUM_InputDevice, i ) const RString& InputDeviceToString( InputDevice i ); @@ -307,7 +307,7 @@ public: RageTimer ts; - DeviceInput(): device(DEVICE_NONE), button(DeviceButton_Invalid), level(0), ts(RageZeroTimer) { } + DeviceInput(): device(InputDevice_Invalid), button(DeviceButton_Invalid), level(0), ts(RageZeroTimer) { } DeviceInput( InputDevice d, DeviceButton b, float l=0 ): device(d), button(b), level(l), ts(RageZeroTimer) { } DeviceInput( InputDevice d, DeviceButton b, float l, const RageTimer &t ): device(d), button(b), level(l), ts(t) { } @@ -334,8 +334,8 @@ public: RString ToString() const; bool FromString( const RString &s ); - bool IsValid() const { return device != DEVICE_NONE; }; - void MakeInvalid() { device = DEVICE_NONE; }; + bool IsValid() const { return device != InputDevice_Invalid; }; + void MakeInvalid() { device = InputDevice_Invalid; }; bool IsJoystick() const { return ::IsJoystick(device); } };