mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-24 20:18:29 +00:00
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:
@@ -475,13 +475,13 @@ static Uint32 VIRTUAL_JoystickGetCapabilities(SDL_Joystick *joystick)
|
||||
hwdata = joystick->hwdata;
|
||||
if (hwdata) {
|
||||
if (hwdata->desc.Rumble) {
|
||||
caps |= SDL_JOYCAP_RUMBLE;
|
||||
caps |= SDL_JOYSTICK_CAP_RUMBLE;
|
||||
}
|
||||
if (hwdata->desc.RumbleTriggers) {
|
||||
caps |= SDL_JOYCAP_RUMBLE_TRIGGERS;
|
||||
caps |= SDL_JOYSTICK_CAP_TRIGGER_RUMBLE;
|
||||
}
|
||||
if (hwdata->desc.SetLED) {
|
||||
caps |= SDL_JOYCAP_LED;
|
||||
caps |= SDL_JOYSTICK_CAP_RGB_LED;
|
||||
}
|
||||
}
|
||||
return caps;
|
||||
|
Reference in New Issue
Block a user