Added some FIXMEs.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 01 Mar 2014 20:59:43 -0500
changeset 8277cd0a00060738
parent 8276 9bd65b58278e
child 8278 e60a7bb2b80b
Added some FIXMEs.
src/joystick/windows/SDL_dxjoystick.c
     1.1 --- a/src/joystick/windows/SDL_dxjoystick.c	Sat Mar 01 20:46:45 2014 -0500
     1.2 +++ b/src/joystick/windows/SDL_dxjoystick.c	Sat Mar 01 20:59:43 2014 -0500
     1.3 @@ -1448,6 +1448,7 @@
     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 +        /* !!! FIXME: why isn't this just using SDL_PrivateJoystickAxis_Int()? */
     1.8          SDL_PrivateJoystickAxis( joystick, 0, (Sint16)pXInputState->Gamepad.sThumbLX );
     1.9          SDL_PrivateJoystickAxis( joystick, 1, (Sint16)(-SDL_max(-32767, pXInputState->Gamepad.sThumbLY)) );
    1.10          SDL_PrivateJoystickAxis( joystick, 2, (Sint16)pXInputState->Gamepad.sThumbRX );
    1.11 @@ -1455,6 +1456,7 @@
    1.12          SDL_PrivateJoystickAxis( joystick, 4, (Sint16)(((int)pXInputState->Gamepad.bLeftTrigger*65535/255) - 32768));
    1.13          SDL_PrivateJoystickAxis( joystick, 5, (Sint16)(((int)pXInputState->Gamepad.bRightTrigger*65535/255) - 32768));
    1.14  
    1.15 +        /* !!! FIXME: why isn't this just using SDL_PrivateJoystickButton_Int(), instead of keeping these two alternating state buffers? */
    1.16          if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_UP ) )
    1.17              SDL_PrivateJoystickButton(joystick, 0, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_UP ? SDL_PRESSED :  SDL_RELEASED );
    1.18          if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_DOWN ) )