src/joystick/windows/SDL_dxjoystick.c
changeset 7296 a8145f734ad3
parent 7293 341d22fe9044
child 7299 280e86365933
     1.1 --- a/src/joystick/windows/SDL_dxjoystick.c	Thu Jun 06 23:18:36 2013 -0700
     1.2 +++ b/src/joystick/windows/SDL_dxjoystick.c	Fri Jun 07 08:48:25 2013 -0700
     1.3 @@ -1495,12 +1495,12 @@
     1.4          XINPUT_STATE_EX *pXInputState = &joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot];
     1.5          XINPUT_STATE_EX *pXInputStatePrev = &joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot ^ 1];
     1.6  
     1.7 -        SDL_PrivateJoystickAxis(joystick, 0, (Sint16)pXInputState->Gamepad.sThumbLX );
     1.8 -        SDL_PrivateJoystickAxis(joystick, 1, (Sint16)(-1*pXInputState->Gamepad.sThumbLY-1) );
     1.9 -        SDL_PrivateJoystickAxis(joystick, 2, (Sint16)pXInputState->Gamepad.sThumbRX );
    1.10 -        SDL_PrivateJoystickAxis(joystick, 3, (Sint16)(-1*pXInputState->Gamepad.sThumbRY-1) );
    1.11 -        SDL_PrivateJoystickAxis(joystick, 4, (Sint16)(((int)pXInputState->Gamepad.bLeftTrigger*65535/255) - 32768));
    1.12 -        SDL_PrivateJoystickAxis(joystick, 5, (Sint16)(((int)pXInputState->Gamepad.bRightTrigger*65535/255) - 32768));
    1.13 +        SDL_PrivateJoystickAxis( joystick, 0, (Sint16)pXInputState->Gamepad.sThumbLX );
    1.14 +        SDL_PrivateJoystickAxis( joystick, 1, (Sint16)(-pXInputState->Gamepad.sThumbLY) );
    1.15 +        SDL_PrivateJoystickAxis( joystick, 2, (Sint16)pXInputState->Gamepad.sThumbRX );
    1.16 +        SDL_PrivateJoystickAxis( joystick, 3, (Sint16)(-pXInputState->Gamepad.sThumbRY) );
    1.17 +        SDL_PrivateJoystickAxis( joystick, 4, (Sint16)(((int)pXInputState->Gamepad.bLeftTrigger*65535/255) - 32768));
    1.18 +        SDL_PrivateJoystickAxis( joystick, 5, (Sint16)(((int)pXInputState->Gamepad.bRightTrigger*65535/255) - 32768));
    1.19  
    1.20          if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_UP ) )
    1.21              SDL_PrivateJoystickButton(joystick, 0, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_UP ? SDL_PRESSED :  SDL_RELEASED );