Generalized the XInput user index into a player index
This commit is contained in:
parent
222a3ed235
commit
678ba78382
18 changed files with 138 additions and 18 deletions
|
@ -42,8 +42,8 @@ struct _SDL_Joystick
|
|||
{
|
||||
SDL_JoystickID instance_id; /* Device instance, monotonically increasing from 0 */
|
||||
char *name; /* Joystick name - system dependent */
|
||||
int player_index; /* Joystick player index, or -1 if unavailable */
|
||||
SDL_JoystickGUID guid; /* Joystick guid */
|
||||
int userid; /* XInput user index, if any */
|
||||
|
||||
int naxes; /* Number of axis controls on the joystick */
|
||||
SDL_JoystickAxisInfo *axes;
|
||||
|
@ -106,6 +106,9 @@ typedef struct _SDL_JoystickDriver
|
|||
/* Function to get the device-dependent name of a joystick */
|
||||
const char *(*GetDeviceName)(int device_index);
|
||||
|
||||
/* Function to get the player index of a joystick */
|
||||
int (*GetDevicePlayerIndex)(int device_index);
|
||||
|
||||
/* Function to return the stable GUID for a plugged in device */
|
||||
SDL_JoystickGUID (*GetDeviceGUID)(int device_index);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue