mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 15:38:29 +00:00
joystick: Add capability flags for rumble and trigger rumble
When API limitations force us to guess, we favor a false positive (reporting support when it doesn't exist) compared to a false negative.
This commit is contained in:

committed by
Sam Lantinga

parent
1ccfbf963e
commit
afccabb881
@@ -668,7 +668,14 @@ WGI_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 ri
|
||||
static Uint32
|
||||
WGI_JoystickGetCapabilities(SDL_Joystick *joystick)
|
||||
{
|
||||
return 0;
|
||||
struct joystick_hwdata *hwdata = joystick->hwdata;
|
||||
|
||||
if (hwdata->gamepad) {
|
||||
/* FIXME: Can WGI even tell us if trigger rumble is supported? */
|
||||
return SDL_JOYCAP_RUMBLE | SDL_JOYCAP_RUMBLE_TRIGGERS;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
Reference in New Issue
Block a user