mirror of
https://github.com/encounter/SDL.git
synced 2025-12-10 14:07:50 +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
@@ -1193,7 +1193,13 @@ LINUX_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16
|
||||
static Uint32
|
||||
LINUX_JoystickGetCapabilities(SDL_Joystick *joystick)
|
||||
{
|
||||
return 0;
|
||||
Uint32 result = 0;
|
||||
|
||||
if (joystick->hwdata->ff_rumble || joystick->hwdata->ff_sine) {
|
||||
result |= SDL_JOYCAP_RUMBLE;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user