Added SDL_GetJoystickCaps() and SDL_GetGamepadCaps() to get the capabilities of controllers
Also added SDL_GAMEPAD_CAP_PLAYER_LED to let the application know if the controller has a visible player LED
This commit is contained in:
1 parent
c88c12148d
commit
cd231a65f6
36 files changed
+133
-226
No files matched your search
@@ -986,11 +986,11 @@ static void HandleGamepadAdded(SDL_JoystickID id, SDL_bool verbose)
|
||||
SDL_Log("Firmware version: 0x%x (%d)\n", firmware_version, firmware_version);
|
||||
}
|
||||
|
||||
if (SDL_GamepadHasRumble(gamepad)) {
|
||||
if (SDL_GetGamepadCaps(gamepad) & SDL_GAMEPAD_CAP_RUMBLE) {
|
||||
SDL_Log("Rumble supported");
|
||||
}
|
||||
|
||||
if (SDL_GamepadHasRumbleTriggers(gamepad)) {
|
||||
if (SDL_GetGamepadCaps(gamepad) & SDL_GAMEPAD_CAP_TRIGGER_RUMBLE) {
|
||||
SDL_Log("Trigger rumble supported");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user