mirror of
https://github.com/encounter/SDL.git
synced 2025-12-17 08:57:01 +00:00
Added functions to get the platform dependent name for a joystick or game controller
This commit is contained in:
@@ -142,7 +142,6 @@ static void PSP_JoystickDetect(void)
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Function to get the device-dependent name of a joystick */
|
||||
static const char *PSP_JoystickName(int idx)
|
||||
{
|
||||
if (idx == 0) return "PSP controller";
|
||||
@@ -151,12 +150,16 @@ static const char *PSP_JoystickName(int idx)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Function to get the device-dependent name of a joystick */
|
||||
static const char *PSP_JoystickGetDeviceName(int device_index)
|
||||
{
|
||||
return "PSP builtin joypad";
|
||||
}
|
||||
|
||||
static const char *PSP_JoystickGetDevicePath(int device_index)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int PSP_JoystickGetDevicePlayerIndex(int device_index)
|
||||
{
|
||||
return -1;
|
||||
@@ -304,6 +307,7 @@ SDL_JoystickDriver SDL_PSP_JoystickDriver =
|
||||
PSP_NumJoysticks,
|
||||
PSP_JoystickDetect,
|
||||
PSP_JoystickGetDeviceName,
|
||||
PSP_JoystickGetDevicePath,
|
||||
PSP_JoystickGetDevicePlayerIndex,
|
||||
PSP_JoystickSetDevicePlayerIndex,
|
||||
PSP_JoystickGetDeviceGUID,
|
||||
|
||||
Reference in New Issue
Block a user