Fix joysticks returning invalid device IDs
This commit is contained in:
parent
d2db3f3993
commit
dbf14df80f
@ -113,7 +113,7 @@ extern "C"
|
|||||||
/* Function to perform the mapping from device index to the instance id for this index */
|
/* Function to perform the mapping from device index to the instance id for this index */
|
||||||
static SDL_JoystickID HAIKU_JoystickGetDeviceInstanceID(int device_index)
|
static SDL_JoystickID HAIKU_JoystickGetDeviceInstanceID(int device_index)
|
||||||
{
|
{
|
||||||
return device_index;
|
return device_index + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void HAIKU_JoystickClose(SDL_Joystick *joystick);
|
static void HAIKU_JoystickClose(SDL_Joystick *joystick);
|
||||||
|
@ -73,7 +73,7 @@ static SDL_JoystickGUID N3DS_JoystickGetDeviceGUID(int device_index)
|
|||||||
|
|
||||||
static SDL_JoystickID N3DS_JoystickGetDeviceInstanceID(int device_index)
|
static SDL_JoystickID N3DS_JoystickGetDeviceInstanceID(int device_index)
|
||||||
{
|
{
|
||||||
return device_index;
|
return device_index + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int N3DS_JoystickOpen(SDL_Joystick *joystick, int device_index)
|
static int N3DS_JoystickOpen(SDL_Joystick *joystick, int device_index)
|
||||||
|
@ -179,7 +179,7 @@ static SDL_JoystickGUID PS2_JoystickGetDeviceGUID(int device_index)
|
|||||||
/* Function to get the current instance id of the joystick located at device_index */
|
/* Function to get the current instance id of the joystick located at device_index */
|
||||||
static SDL_JoystickID PS2_JoystickGetDeviceInstanceID(int device_index)
|
static SDL_JoystickID PS2_JoystickGetDeviceInstanceID(int device_index)
|
||||||
{
|
{
|
||||||
return device_index;
|
return device_index + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Function to open a joystick for use.
|
/* Function to open a joystick for use.
|
||||||
|
@ -140,7 +140,7 @@ static SDL_JoystickGUID PSP_JoystickGetDeviceGUID(int device_index)
|
|||||||
/* Function to perform the mapping from device index to the instance id for this index */
|
/* Function to perform the mapping from device index to the instance id for this index */
|
||||||
static SDL_JoystickID PSP_JoystickGetDeviceInstanceID(int device_index)
|
static SDL_JoystickID PSP_JoystickGetDeviceInstanceID(int device_index)
|
||||||
{
|
{
|
||||||
return device_index;
|
return device_index + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Function to open a joystick for use.
|
/* Function to open a joystick for use.
|
||||||
|
@ -151,7 +151,7 @@ void VITA_JoystickDetect()
|
|||||||
/* Function to perform the mapping from device index to the instance id for this index */
|
/* Function to perform the mapping from device index to the instance id for this index */
|
||||||
SDL_JoystickID VITA_JoystickGetDeviceInstanceID(int device_index)
|
SDL_JoystickID VITA_JoystickGetDeviceInstanceID(int device_index)
|
||||||
{
|
{
|
||||||
return device_index;
|
return device_index + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *VITA_JoystickGetDeviceName(int index)
|
const char *VITA_JoystickGetDeviceName(int index)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user