mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 00:46:25 +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:
@@ -1000,10 +1000,13 @@ static Uint32 HIDAPI_DriverPS5_GetJoystickCapabilities(SDL_HIDAPI_Device *device
|
||||
|
||||
if (ctx->enhanced_mode_available) {
|
||||
if (ctx->lightbar_supported) {
|
||||
result |= SDL_JOYCAP_LED;
|
||||
result |= SDL_JOYSTICK_CAP_RGB_LED;
|
||||
}
|
||||
if (ctx->playerled_supported) {
|
||||
result |= SDL_JOYSTICK_CAP_PLAYER_LED;
|
||||
}
|
||||
if (ctx->vibration_supported) {
|
||||
result |= SDL_JOYCAP_RUMBLE;
|
||||
result |= SDL_JOYSTICK_CAP_RUMBLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user