diff --git a/stepmania/src/arch/InputHandler/InputHandler_Xbox.cpp b/stepmania/src/arch/InputHandler/InputHandler_Xbox.cpp index 0b7a0174a1..2a30a7a86a 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_Xbox.cpp +++ b/stepmania/src/arch/InputHandler/InputHandler_Xbox.cpp @@ -103,8 +103,8 @@ void InputHandler_Xbox::Update() if(nowPressed != wasPressed) { - JoystickButton Button = JoystickButton(JOY_HAT_LEFT + j); - if(Button >= NUM_JOYSTICK_BUTTONS) + DeviceButton Button = DeviceButton(JOY_HAT_LEFT + j); + if(Button >= JOY_BUTTON_32) { LOG->Warn("Ignored joystick event (button too high)"); continue; @@ -123,8 +123,8 @@ void InputHandler_Xbox::Update() if(nowPressed != wasPressed) { - JoystickButton Button = JoystickButton(JOY_BUTTON_1 + j); - if(Button >= NUM_JOYSTICK_BUTTONS) + DeviceButton Button = DeviceButton(JOY_BUTTON_1 + j); + if(Button >= JOY_BUTTON_32) { LOG->Warn("Ignored joystick event (button too high)"); continue; @@ -146,8 +146,8 @@ void InputHandler_Xbox::Update() if(j == 1 || j == 3) axes[j] = -axes[j]; - JoystickButton neg = (JoystickButton)(JOY_LEFT + (2 * j)); - JoystickButton pos = (JoystickButton)(JOY_RIGHT + (2 * j)); + DeviceButton neg = (DeviceButton)(JOY_LEFT + (2 * j)); + DeviceButton pos = (DeviceButton)(JOY_RIGHT + (2 * j)); float l = SCALE( axes[j], 0.0f, 32768.0f, 0.0f, 1.0f ); ButtonPressed(DeviceInput(inputDevice, neg,max(-l,0),RageZeroTimer), axes[j] > -16000); ButtonPressed(DeviceInput(inputDevice, pos,max(+l,0),RageZeroTimer), axes[j] < +16000);