mirror of
https://github.com/encounter/SDL.git
synced 2025-12-13 23:26:18 +00:00
Added functions to get the platform dependent name for a joystick or game controller
This commit is contained in:
@@ -377,15 +377,17 @@ static void OS2_JoystickDetect(void)
|
||||
{
|
||||
}
|
||||
|
||||
/***********************************************************/
|
||||
/* Function to get the device-dependent name of a joystick */
|
||||
/***********************************************************/
|
||||
static const char *OS2_JoystickGetDeviceName(int device_index)
|
||||
{
|
||||
/* No need to verify if device exists, already done in upper layer */
|
||||
return SYS_JoyData[device_index].szDeviceName;
|
||||
}
|
||||
|
||||
static const char *OS2_JoystickGetDevicePath(int device_index)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int OS2_JoystickGetDevicePlayerIndex(int device_index)
|
||||
{
|
||||
return -1;
|
||||
@@ -779,6 +781,7 @@ SDL_JoystickDriver SDL_OS2_JoystickDriver =
|
||||
OS2_NumJoysticks,
|
||||
OS2_JoystickDetect,
|
||||
OS2_JoystickGetDeviceName,
|
||||
OS2_JoystickGetDevicePath,
|
||||
OS2_JoystickGetDevicePlayerIndex,
|
||||
OS2_JoystickSetDevicePlayerIndex,
|
||||
OS2_JoystickGetDeviceGUID,
|
||||
|
||||
Reference in New Issue
Block a user