src/joystick/windows/SDL_dxjoystick.c
changeset 7711 db9e27a52d77
parent 7709 edd2c14acf66
child 7712 66b5b8446275
     1.1 --- a/src/joystick/windows/SDL_dxjoystick.c	Wed Aug 28 22:05:16 2013 -0400
     1.2 +++ b/src/joystick/windows/SDL_dxjoystick.c	Wed Aug 28 22:07:54 2013 -0400
     1.3 @@ -1552,21 +1552,7 @@
     1.4  void
     1.5  SDL_SYS_JoystickClose(SDL_Joystick * joystick)
     1.6  {
     1.7 -    if ( joystick->hwdata->bXInputDevice )
     1.8 -    {
     1.9 -        JoyStick_DeviceData *joysticklist = SYS_Joystick;
    1.10 -        /* scan the opened joysticks and clear the userid for this instance */
    1.11 -        for( ; joysticklist; joysticklist = joysticklist->pNext)
    1.12 -        {
    1.13 -            if ( joysticklist->bXInputDevice && joysticklist->nInstanceID == joystick->instance_id )
    1.14 -            {
    1.15 -                joysticklist->XInputUserId = INVALID_XINPUT_USERID;
    1.16 -            }
    1.17 -        }
    1.18 -
    1.19 -    }
    1.20 -    else
    1.21 -    {
    1.22 +    if (!joystick->hwdata->bXInputDevice) {
    1.23          IDirectInputDevice8_Unacquire(joystick->hwdata->InputDevice);
    1.24          IDirectInputDevice8_Release(joystick->hwdata->InputDevice);
    1.25      }