mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-30 18:41:38 +00:00
Renamed functions to get information from device IDs
Fixes https://github.com/libsdl-org/SDL/issues/10237
This commit is contained in:
@@ -1778,8 +1778,8 @@ static GamepadMapping_t *SDL_PrivateGetGamepadMapping(SDL_JoystickID instance_id
|
||||
|
||||
SDL_AssertJoysticksLocked();
|
||||
|
||||
name = SDL_GetJoystickInstanceName(instance_id);
|
||||
guid = SDL_GetJoystickInstanceGUID(instance_id);
|
||||
name = SDL_GetJoystickNameFromID(instance_id);
|
||||
guid = SDL_GetJoystickGUIDFromID(instance_id);
|
||||
mapping = SDL_PrivateGetGamepadMappingForNameAndGUID(name, guid);
|
||||
if (!mapping && create_mapping) {
|
||||
SDL_GamepadMapping raw_map;
|
||||
@@ -2246,7 +2246,7 @@ char *SDL_GetGamepadMapping(SDL_Gamepad *gamepad)
|
||||
*/
|
||||
int SDL_SetGamepadMapping(SDL_JoystickID instance_id, const char *mapping)
|
||||
{
|
||||
SDL_JoystickGUID guid = SDL_GetJoystickInstanceGUID(instance_id);
|
||||
SDL_JoystickGUID guid = SDL_GetJoystickGUIDFromID(instance_id);
|
||||
int retval = -1;
|
||||
|
||||
if (SDL_memcmp(&guid, &s_zeroGUID, sizeof(guid)) == 0) {
|
||||
@@ -2420,7 +2420,7 @@ SDL_JoystickID *SDL_GetGamepads(int *count)
|
||||
return joysticks;
|
||||
}
|
||||
|
||||
const char *SDL_GetGamepadInstanceName(SDL_JoystickID instance_id)
|
||||
const char *SDL_GetGamepadNameFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
const char *retval = NULL;
|
||||
|
||||
@@ -2429,7 +2429,7 @@ const char *SDL_GetGamepadInstanceName(SDL_JoystickID instance_id)
|
||||
GamepadMapping_t *mapping = SDL_PrivateGetGamepadMapping(instance_id, SDL_TRUE);
|
||||
if (mapping) {
|
||||
if (SDL_strcmp(mapping->name, "*") == 0) {
|
||||
retval = SDL_GetJoystickInstanceName(instance_id);
|
||||
retval = SDL_GetJoystickNameFromID(instance_id);
|
||||
} else {
|
||||
retval = mapping->name;
|
||||
}
|
||||
@@ -2440,37 +2440,37 @@ const char *SDL_GetGamepadInstanceName(SDL_JoystickID instance_id)
|
||||
return retval;
|
||||
}
|
||||
|
||||
const char *SDL_GetGamepadInstancePath(SDL_JoystickID instance_id)
|
||||
const char *SDL_GetGamepadPathFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
return SDL_GetJoystickInstancePath(instance_id);
|
||||
return SDL_GetJoystickPathFromID(instance_id);
|
||||
}
|
||||
|
||||
int SDL_GetGamepadInstancePlayerIndex(SDL_JoystickID instance_id)
|
||||
int SDL_GetGamepadPlayerIndexFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
return SDL_GetJoystickInstancePlayerIndex(instance_id);
|
||||
return SDL_GetJoystickPlayerIndexFromID(instance_id);
|
||||
}
|
||||
|
||||
SDL_JoystickGUID SDL_GetGamepadInstanceGUID(SDL_JoystickID instance_id)
|
||||
SDL_JoystickGUID SDL_GetGamepadGUIDFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
return SDL_GetJoystickInstanceGUID(instance_id);
|
||||
return SDL_GetJoystickGUIDFromID(instance_id);
|
||||
}
|
||||
|
||||
Uint16 SDL_GetGamepadInstanceVendor(SDL_JoystickID instance_id)
|
||||
Uint16 SDL_GetGamepadVendorFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
return SDL_GetJoystickInstanceVendor(instance_id);
|
||||
return SDL_GetJoystickVendorFromID(instance_id);
|
||||
}
|
||||
|
||||
Uint16 SDL_GetGamepadInstanceProduct(SDL_JoystickID instance_id)
|
||||
Uint16 SDL_GetGamepadProductFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
return SDL_GetJoystickInstanceProduct(instance_id);
|
||||
return SDL_GetJoystickProductFromID(instance_id);
|
||||
}
|
||||
|
||||
Uint16 SDL_GetGamepadInstanceProductVersion(SDL_JoystickID instance_id)
|
||||
Uint16 SDL_GetGamepadProductVersionFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
return SDL_GetJoystickInstanceProductVersion(instance_id);
|
||||
return SDL_GetJoystickProductVersionFromID(instance_id);
|
||||
}
|
||||
|
||||
SDL_GamepadType SDL_GetGamepadInstanceType(SDL_JoystickID instance_id)
|
||||
SDL_GamepadType SDL_GetGamepadTypeFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
SDL_GamepadType type = SDL_GAMEPAD_TYPE_UNKNOWN;
|
||||
|
||||
@@ -2507,11 +2507,11 @@ SDL_GamepadType SDL_GetRealGamepadInstanceType(SDL_JoystickID instance_id)
|
||||
|
||||
SDL_LockJoysticks();
|
||||
{
|
||||
info = SDL_GetJoystickInstanceVirtualGamepadInfo(instance_id);
|
||||
info = SDL_GetJoystickVirtualGamepadInfoFromID(instance_id);
|
||||
if (info) {
|
||||
type = info->type;
|
||||
} else {
|
||||
type = SDL_GetGamepadTypeFromGUID(SDL_GetJoystickInstanceGUID(instance_id), SDL_GetJoystickInstanceName(instance_id));
|
||||
type = SDL_GetGamepadTypeFromGUID(SDL_GetJoystickGUIDFromID(instance_id), SDL_GetJoystickNameFromID(instance_id));
|
||||
}
|
||||
}
|
||||
SDL_UnlockJoysticks();
|
||||
@@ -2519,7 +2519,7 @@ SDL_GamepadType SDL_GetRealGamepadInstanceType(SDL_JoystickID instance_id)
|
||||
return type;
|
||||
}
|
||||
|
||||
char *SDL_GetGamepadInstanceMapping(SDL_JoystickID instance_id)
|
||||
char *SDL_GetGamepadMappingFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
char *retval = NULL;
|
||||
|
||||
@@ -2528,7 +2528,7 @@ char *SDL_GetGamepadInstanceMapping(SDL_JoystickID instance_id)
|
||||
GamepadMapping_t *mapping = SDL_PrivateGetGamepadMapping(instance_id, SDL_TRUE);
|
||||
if (mapping) {
|
||||
char pchGUID[33];
|
||||
const SDL_JoystickGUID guid = SDL_GetJoystickInstanceGUID(instance_id);
|
||||
const SDL_JoystickGUID guid = SDL_GetJoystickGUIDFromID(instance_id);
|
||||
SDL_GetJoystickGUIDString(guid, pchGUID, sizeof(pchGUID));
|
||||
SDL_asprintf(&retval, "%s,%s,%s", pchGUID, mapping->name, mapping->mapping);
|
||||
}
|
||||
@@ -3272,14 +3272,14 @@ int SDL_GetGamepadSensorData(SDL_Gamepad *gamepad, SDL_SensorType type, float *d
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
SDL_JoystickID SDL_GetGamepadInstanceID(SDL_Gamepad *gamepad)
|
||||
SDL_JoystickID SDL_GetGamepadID(SDL_Gamepad *gamepad)
|
||||
{
|
||||
SDL_Joystick *joystick = SDL_GetGamepadJoystick(gamepad);
|
||||
|
||||
if (!joystick) {
|
||||
return 0;
|
||||
}
|
||||
return SDL_GetJoystickInstanceID(joystick);
|
||||
return SDL_GetJoystickID(joystick);
|
||||
}
|
||||
|
||||
SDL_PropertiesID SDL_GetGamepadProperties(SDL_Gamepad *gamepad)
|
||||
@@ -3336,7 +3336,7 @@ SDL_GamepadType SDL_GetGamepadType(SDL_Gamepad *gamepad)
|
||||
{
|
||||
CHECK_GAMEPAD_MAGIC(gamepad, SDL_GAMEPAD_TYPE_UNKNOWN);
|
||||
|
||||
info = SDL_GetJoystickInstanceVirtualGamepadInfo(gamepad->joystick->instance_id);
|
||||
info = SDL_GetJoystickVirtualGamepadInfoFromID(gamepad->joystick->instance_id);
|
||||
if (info) {
|
||||
type = info->type;
|
||||
} else {
|
||||
|
||||
@@ -754,7 +754,7 @@ SDL_JoystickID *SDL_GetJoysticks(int *count)
|
||||
return joysticks;
|
||||
}
|
||||
|
||||
const SDL_SteamVirtualGamepadInfo *SDL_GetJoystickInstanceVirtualGamepadInfo(SDL_JoystickID instance_id)
|
||||
const SDL_SteamVirtualGamepadInfo *SDL_GetJoystickVirtualGamepadInfoFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
SDL_JoystickDriver *driver;
|
||||
int device_index;
|
||||
@@ -770,7 +770,7 @@ const SDL_SteamVirtualGamepadInfo *SDL_GetJoystickInstanceVirtualGamepadInfo(SDL
|
||||
/*
|
||||
* Get the implementation dependent name of a joystick
|
||||
*/
|
||||
const char *SDL_GetJoystickInstanceName(SDL_JoystickID instance_id)
|
||||
const char *SDL_GetJoystickNameFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
SDL_JoystickDriver *driver;
|
||||
int device_index;
|
||||
@@ -778,7 +778,7 @@ const char *SDL_GetJoystickInstanceName(SDL_JoystickID instance_id)
|
||||
const SDL_SteamVirtualGamepadInfo *info;
|
||||
|
||||
SDL_LockJoysticks();
|
||||
info = SDL_GetJoystickInstanceVirtualGamepadInfo(instance_id);
|
||||
info = SDL_GetJoystickVirtualGamepadInfoFromID(instance_id);
|
||||
if (info) {
|
||||
name = info->name;
|
||||
} else if (SDL_GetDriverAndJoystickIndex(instance_id, &driver, &device_index)) {
|
||||
@@ -792,7 +792,7 @@ const char *SDL_GetJoystickInstanceName(SDL_JoystickID instance_id)
|
||||
/*
|
||||
* Get the implementation dependent path of a joystick
|
||||
*/
|
||||
const char *SDL_GetJoystickInstancePath(SDL_JoystickID instance_id)
|
||||
const char *SDL_GetJoystickPathFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
SDL_JoystickDriver *driver;
|
||||
int device_index;
|
||||
@@ -813,7 +813,7 @@ const char *SDL_GetJoystickInstancePath(SDL_JoystickID instance_id)
|
||||
/*
|
||||
* Get the player index of a joystick, or -1 if it's not available
|
||||
*/
|
||||
int SDL_GetJoystickInstancePlayerIndex(SDL_JoystickID instance_id)
|
||||
int SDL_GetJoystickPlayerIndexFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
int player_index;
|
||||
|
||||
@@ -864,14 +864,14 @@ static SDL_bool IsROGAlly(SDL_Joystick *joystick)
|
||||
for (i = 0; sensors[i]; ++i) {
|
||||
SDL_SensorID sensor = sensors[i];
|
||||
|
||||
if (!has_ally_accel && SDL_GetSensorInstanceType(sensor) == SDL_SENSOR_ACCEL) {
|
||||
const char *sensor_name = SDL_GetSensorInstanceName(sensor);
|
||||
if (!has_ally_accel && SDL_GetSensorTypeFromID(sensor) == SDL_SENSOR_ACCEL) {
|
||||
const char *sensor_name = SDL_GetSensorNameFromID(sensor);
|
||||
if (sensor_name && SDL_strcmp(sensor_name, "Sensor BMI320 Acc") == 0) {
|
||||
has_ally_accel = SDL_TRUE;
|
||||
}
|
||||
}
|
||||
if (!has_ally_gyro && SDL_GetSensorInstanceType(sensor) == SDL_SENSOR_GYRO) {
|
||||
const char *sensor_name = SDL_GetSensorInstanceName(sensor);
|
||||
if (!has_ally_gyro && SDL_GetSensorTypeFromID(sensor) == SDL_SENSOR_GYRO) {
|
||||
const char *sensor_name = SDL_GetSensorNameFromID(sensor);
|
||||
if (sensor_name && SDL_strcmp(sensor_name, "Sensor BMI320 Gyr") == 0) {
|
||||
has_ally_gyro = SDL_TRUE;
|
||||
}
|
||||
@@ -966,14 +966,14 @@ static void AttemptSensorFusion(SDL_Joystick *joystick, SDL_bool invert_sensors)
|
||||
for (i = 0; sensors[i]; ++i) {
|
||||
SDL_SensorID sensor = sensors[i];
|
||||
|
||||
if (!joystick->accel_sensor && SDL_GetSensorInstanceType(sensor) == SDL_SENSOR_ACCEL) {
|
||||
if (!joystick->accel_sensor && SDL_GetSensorTypeFromID(sensor) == SDL_SENSOR_ACCEL) {
|
||||
/* Increment the sensor subsystem reference count */
|
||||
SDL_InitSubSystem(SDL_INIT_SENSOR);
|
||||
|
||||
joystick->accel_sensor = sensor;
|
||||
SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_ACCEL, 0.0f);
|
||||
}
|
||||
if (!joystick->gyro_sensor && SDL_GetSensorInstanceType(sensor) == SDL_SENSOR_GYRO) {
|
||||
if (!joystick->gyro_sensor && SDL_GetSensorTypeFromID(sensor) == SDL_SENSOR_GYRO) {
|
||||
/* Increment the sensor subsystem reference count */
|
||||
SDL_InitSubSystem(SDL_INIT_SENSOR);
|
||||
|
||||
@@ -1151,7 +1151,7 @@ SDL_Joystick *SDL_OpenJoystick(SDL_JoystickID instance_id)
|
||||
}
|
||||
|
||||
/* Get the Steam Input API handle */
|
||||
info = SDL_GetJoystickInstanceVirtualGamepadInfo(instance_id);
|
||||
info = SDL_GetJoystickVirtualGamepadInfoFromID(instance_id);
|
||||
if (info) {
|
||||
joystick->steam_handle = info->handle;
|
||||
}
|
||||
@@ -1567,7 +1567,7 @@ SDL_bool SDL_JoystickConnected(SDL_Joystick *joystick)
|
||||
/*
|
||||
* Get the instance id for this opened joystick
|
||||
*/
|
||||
SDL_JoystickID SDL_GetJoystickInstanceID(SDL_Joystick *joystick)
|
||||
SDL_JoystickID SDL_GetJoystickID(SDL_Joystick *joystick)
|
||||
{
|
||||
SDL_JoystickID retval;
|
||||
|
||||
@@ -1651,7 +1651,7 @@ const char *SDL_GetJoystickName(SDL_Joystick *joystick)
|
||||
{
|
||||
CHECK_JOYSTICK_MAGIC(joystick, NULL);
|
||||
|
||||
info = SDL_GetJoystickInstanceVirtualGamepadInfo(joystick->instance_id);
|
||||
info = SDL_GetJoystickVirtualGamepadInfoFromID(joystick->instance_id);
|
||||
if (info) {
|
||||
retval = info->name;
|
||||
} else {
|
||||
@@ -2362,7 +2362,7 @@ static void SendSteamHandleUpdateEvents(void)
|
||||
continue;
|
||||
}
|
||||
|
||||
info = SDL_GetJoystickInstanceVirtualGamepadInfo(joystick->instance_id);
|
||||
info = SDL_GetJoystickVirtualGamepadInfoFromID(joystick->instance_id);
|
||||
if (info) {
|
||||
if (joystick->steam_handle != info->handle) {
|
||||
joystick->steam_handle = info->handle;
|
||||
@@ -3258,7 +3258,7 @@ SDL_bool SDL_ShouldIgnoreJoystick(const char *name, SDL_JoystickGUID guid)
|
||||
}
|
||||
|
||||
/* return the guid for this index */
|
||||
SDL_JoystickGUID SDL_GetJoystickInstanceGUID(SDL_JoystickID instance_id)
|
||||
SDL_JoystickGUID SDL_GetJoystickGUIDFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
SDL_JoystickDriver *driver;
|
||||
int device_index;
|
||||
@@ -3275,17 +3275,17 @@ SDL_JoystickGUID SDL_GetJoystickInstanceGUID(SDL_JoystickID instance_id)
|
||||
return guid;
|
||||
}
|
||||
|
||||
Uint16 SDL_GetJoystickInstanceVendor(SDL_JoystickID instance_id)
|
||||
Uint16 SDL_GetJoystickVendorFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
Uint16 vendor;
|
||||
const SDL_SteamVirtualGamepadInfo *info;
|
||||
|
||||
SDL_LockJoysticks();
|
||||
info = SDL_GetJoystickInstanceVirtualGamepadInfo(instance_id);
|
||||
info = SDL_GetJoystickVirtualGamepadInfoFromID(instance_id);
|
||||
if (info) {
|
||||
vendor = info->vendor_id;
|
||||
} else {
|
||||
SDL_JoystickGUID guid = SDL_GetJoystickInstanceGUID(instance_id);
|
||||
SDL_JoystickGUID guid = SDL_GetJoystickGUIDFromID(instance_id);
|
||||
|
||||
SDL_GetJoystickGUIDInfo(guid, &vendor, NULL, NULL, NULL);
|
||||
}
|
||||
@@ -3294,17 +3294,17 @@ Uint16 SDL_GetJoystickInstanceVendor(SDL_JoystickID instance_id)
|
||||
return vendor;
|
||||
}
|
||||
|
||||
Uint16 SDL_GetJoystickInstanceProduct(SDL_JoystickID instance_id)
|
||||
Uint16 SDL_GetJoystickProductFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
Uint16 product;
|
||||
const SDL_SteamVirtualGamepadInfo *info;
|
||||
|
||||
SDL_LockJoysticks();
|
||||
info = SDL_GetJoystickInstanceVirtualGamepadInfo(instance_id);
|
||||
info = SDL_GetJoystickVirtualGamepadInfoFromID(instance_id);
|
||||
if (info) {
|
||||
product = info->product_id;
|
||||
} else {
|
||||
SDL_JoystickGUID guid = SDL_GetJoystickInstanceGUID(instance_id);
|
||||
SDL_JoystickGUID guid = SDL_GetJoystickGUIDFromID(instance_id);
|
||||
|
||||
SDL_GetJoystickGUIDInfo(guid, NULL, &product, NULL, NULL);
|
||||
}
|
||||
@@ -3313,19 +3313,19 @@ Uint16 SDL_GetJoystickInstanceProduct(SDL_JoystickID instance_id)
|
||||
return product;
|
||||
}
|
||||
|
||||
Uint16 SDL_GetJoystickInstanceProductVersion(SDL_JoystickID instance_id)
|
||||
Uint16 SDL_GetJoystickProductVersionFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
Uint16 version;
|
||||
SDL_JoystickGUID guid = SDL_GetJoystickInstanceGUID(instance_id);
|
||||
SDL_JoystickGUID guid = SDL_GetJoystickGUIDFromID(instance_id);
|
||||
|
||||
SDL_GetJoystickGUIDInfo(guid, NULL, NULL, &version, NULL);
|
||||
return version;
|
||||
}
|
||||
|
||||
SDL_JoystickType SDL_GetJoystickInstanceType(SDL_JoystickID instance_id)
|
||||
SDL_JoystickType SDL_GetJoystickTypeFromID(SDL_JoystickID instance_id)
|
||||
{
|
||||
SDL_JoystickType type;
|
||||
SDL_JoystickGUID guid = SDL_GetJoystickInstanceGUID(instance_id);
|
||||
SDL_JoystickGUID guid = SDL_GetJoystickGUIDFromID(instance_id);
|
||||
|
||||
type = SDL_GetJoystickGUIDType(guid);
|
||||
if (type == SDL_JOYSTICK_TYPE_UNKNOWN) {
|
||||
@@ -3362,7 +3362,7 @@ Uint16 SDL_GetJoystickVendor(SDL_Joystick *joystick)
|
||||
{
|
||||
CHECK_JOYSTICK_MAGIC(joystick, 0);
|
||||
|
||||
info = SDL_GetJoystickInstanceVirtualGamepadInfo(joystick->instance_id);
|
||||
info = SDL_GetJoystickVirtualGamepadInfoFromID(joystick->instance_id);
|
||||
if (info) {
|
||||
vendor = info->vendor_id;
|
||||
} else {
|
||||
@@ -3385,7 +3385,7 @@ Uint16 SDL_GetJoystickProduct(SDL_Joystick *joystick)
|
||||
{
|
||||
CHECK_JOYSTICK_MAGIC(joystick, 0);
|
||||
|
||||
info = SDL_GetJoystickInstanceVirtualGamepadInfo(joystick->instance_id);
|
||||
info = SDL_GetJoystickVirtualGamepadInfoFromID(joystick->instance_id);
|
||||
if (info) {
|
||||
product = info->product_id;
|
||||
} else {
|
||||
|
||||
@@ -170,7 +170,7 @@ extern int SDL_SendJoystickSensor(Uint64 timestamp, SDL_Joystick *joystick, SDL_
|
||||
extern void SDL_SendJoystickPowerInfo(SDL_Joystick *joystick, SDL_PowerState state, int percent);
|
||||
|
||||
/* Function to get the Steam virtual gamepad info for a joystick */
|
||||
extern const struct SDL_SteamVirtualGamepadInfo *SDL_GetJoystickInstanceVirtualGamepadInfo(SDL_JoystickID instance_id);
|
||||
extern const struct SDL_SteamVirtualGamepadInfo *SDL_GetJoystickVirtualGamepadInfoFromID(SDL_JoystickID instance_id);
|
||||
|
||||
/* Internal sanity checking functions */
|
||||
extern SDL_bool SDL_IsJoystickValid(SDL_Joystick *joystick);
|
||||
|
||||
@@ -234,7 +234,7 @@ static void VITA_JoystickUpdate(SDL_Joystick *joystick)
|
||||
SceCtrlData *pad = NULL;
|
||||
Uint64 timestamp = SDL_GetTicksNS();
|
||||
|
||||
int index = (int)SDL_GetJoystickInstanceID(joystick) - 1;
|
||||
int index = (int)SDL_GetJoystickID(joystick) - 1;
|
||||
|
||||
if (index == 0)
|
||||
pad = &pad0;
|
||||
@@ -327,7 +327,7 @@ static SDL_JoystickGUID VITA_JoystickGetDeviceGUID(int device_index)
|
||||
|
||||
static int VITA_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble)
|
||||
{
|
||||
int index = (int)SDL_GetJoystickInstanceID(joystick) - 1;
|
||||
int index = (int)SDL_GetJoystickID(joystick) - 1;
|
||||
SceCtrlActuator act;
|
||||
|
||||
if (index < 0 || index > 3) {
|
||||
@@ -349,7 +349,7 @@ static int VITA_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left, Uint
|
||||
|
||||
static int VITA_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue)
|
||||
{
|
||||
int index = (int)SDL_GetJoystickInstanceID(joystick) - 1;
|
||||
int index = (int)SDL_GetJoystickID(joystick) - 1;
|
||||
if (index < 0 || index > 3) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user