src/joystick/windows/SDL_windowsjoystick.c
changeset 12359 691c32a30fb9
parent 12201 8bdc4d340419
child 12503 806492103856
equal deleted inserted replaced
12358:7a7612d67fa7 12359:691c32a30fb9
   405         device = device->pNext;
   405         device = device->pNext;
   406 
   406 
   407     return device->joystickname;
   407     return device->joystickname;
   408 }
   408 }
   409 
   409 
       
   410 static int
       
   411 WINDOWS_JoystickGetDevicePlayerIndex(int device_index)
       
   412 {
       
   413     JoyStick_DeviceData *device = SYS_Joystick;
       
   414     int index;
       
   415 
       
   416     for (index = device_index; index > 0; index--)
       
   417         device = device->pNext;
       
   418 
       
   419     return device->bXInputDevice ? (int)device->XInputUserId : -1;
       
   420 }
       
   421 
   410 /* return the stable device guid for this device index */
   422 /* return the stable device guid for this device index */
   411 static SDL_JoystickGUID
   423 static SDL_JoystickGUID
   412 WINDOWS_JoystickGetDeviceGUID(int device_index)
   424 WINDOWS_JoystickGetDeviceGUID(int device_index)
   413 {
   425 {
   414     JoyStick_DeviceData *device = SYS_Joystick;
   426     JoyStick_DeviceData *device = SYS_Joystick;
   542 {
   554 {
   543     WINDOWS_JoystickInit,
   555     WINDOWS_JoystickInit,
   544     WINDOWS_JoystickGetCount,
   556     WINDOWS_JoystickGetCount,
   545     WINDOWS_JoystickDetect,
   557     WINDOWS_JoystickDetect,
   546     WINDOWS_JoystickGetDeviceName,
   558     WINDOWS_JoystickGetDeviceName,
       
   559     WINDOWS_JoystickGetDevicePlayerIndex,
   547     WINDOWS_JoystickGetDeviceGUID,
   560     WINDOWS_JoystickGetDeviceGUID,
   548     WINDOWS_JoystickGetDeviceInstanceID,
   561     WINDOWS_JoystickGetDeviceInstanceID,
   549     WINDOWS_JoystickOpen,
   562     WINDOWS_JoystickOpen,
   550     WINDOWS_JoystickRumble,
   563     WINDOWS_JoystickRumble,
   551     WINDOWS_JoystickUpdate,
   564     WINDOWS_JoystickUpdate,