Added SDL_GetGamepadInstanceID()
This commit is contained in:
@@ -869,6 +869,7 @@ SDL3_0.0.0 {
|
||||
SDL_wcsstr;
|
||||
SDL_wcstol;
|
||||
SDL_ClearClipboardData;
|
||||
SDL_GetGamepadInstanceID;
|
||||
# extra symbols go here (don't modify this line)
|
||||
local: *;
|
||||
};
|
||||
|
||||
@@ -895,3 +895,4 @@
|
||||
|
||||
/* New API symbols are added at the end */
|
||||
#define SDL_ClearClipboardData SDL_ClearClipboardData_REAL
|
||||
#define SDL_GetGamepadInstanceID SDL_GetGamepadInstanceID_REAL
|
||||
|
||||
@@ -940,3 +940,4 @@ SDL_DYNAPI_PROC(long,SDL_wcstol,(const wchar_t *a, wchar_t **b, int c),(a,b,c),r
|
||||
|
||||
/* New API symbols are added at the end */
|
||||
SDL_DYNAPI_PROC(int,SDL_ClearClipboardData,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_JoystickID,SDL_GetGamepadInstanceID,(SDL_Gamepad *a),(a),return)
|
||||
|
||||
@@ -2655,6 +2655,16 @@ int SDL_GetGamepadSensorData(SDL_Gamepad *gamepad, SDL_SensorType type, float *d
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
SDL_JoystickID SDL_GetGamepadInstanceID(SDL_Gamepad *gamepad)
|
||||
{
|
||||
SDL_Joystick *joystick = SDL_GetGamepadJoystick(gamepad);
|
||||
|
||||
if (joystick == NULL) {
|
||||
return 0;
|
||||
}
|
||||
return SDL_GetJoystickInstanceID(joystick);
|
||||
}
|
||||
|
||||
const char *SDL_GetGamepadName(SDL_Gamepad *gamepad)
|
||||
{
|
||||
const char *retval = NULL;
|
||||
|
||||
Reference in New Issue
Block a user