Adds function SDL_JoystickGetDeviceHWID() to get the hardware ID of a joystick so devices can be uniquely referenced over program executions.
An example would be one SDL application launching another SDL application, passing it the HWID of the joystick that is to be the "primary" controller.
This commit is contained in:
parent
f6027780aa
commit
f1003e7110
6 changed files with 41 additions and 0 deletions
|
@ -144,6 +144,12 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
|
|||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);
|
||||
|
||||
/**
|
||||
* Return the HWID for the joystick at this index
|
||||
* This can be called before any joysticks are opened.
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickGetDeviceHWID(int device_index);
|
||||
|
||||
/**
|
||||
* Get the USB vendor ID of a joystick, if available.
|
||||
* This can be called before any joysticks are opened.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue