mirror of
https://github.com/encounter/SDL.git
synced 2025-12-10 22:17:59 +00:00
Automatically assign player indexes to game controllers, and allow changing the player index for game controllers and joysticks.
Added the functions SDL_JoystickFromPlayerIndex(), SDL_JoystickSetPlayerIndex(), SDL_GameControllerFromPlayerIndex(), and SDL_GameControllerSetPlayerIndex()
This commit is contained in:
@@ -276,6 +276,11 @@ BSD_JoystickGetDevicePlayerIndex(int device_index)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void
|
||||
BSD_JoystickSetDevicePlayerIndex(int device_index, int player_index)
|
||||
{
|
||||
}
|
||||
|
||||
/* Function to perform the mapping from device index to the instance id for this index */
|
||||
static SDL_JoystickID
|
||||
BSD_JoystickGetDeviceInstanceID(int device_index)
|
||||
@@ -764,6 +769,7 @@ SDL_JoystickDriver SDL_BSD_JoystickDriver =
|
||||
BSD_JoystickDetect,
|
||||
BSD_JoystickGetDeviceName,
|
||||
BSD_JoystickGetDevicePlayerIndex,
|
||||
BSD_JoystickSetDevicePlayerIndex,
|
||||
BSD_JoystickGetDeviceGUID,
|
||||
BSD_JoystickGetDeviceInstanceID,
|
||||
BSD_JoystickOpen,
|
||||
|
||||
Reference in New Issue
Block a user