mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-02 01:47:41 +00:00
joystick: Add APIs to query rumble support
This commit is contained in:
parent
afccabb881
commit
fe09a4930a
8 changed files with 134 additions and 9 deletions
|
@ -168,6 +168,14 @@ static void AddController(int device_index, SDL_bool verbose)
|
|||
SDL_GameControllerSetSensorEnabled(gamecontroller, SDL_SENSOR_GYRO, SDL_TRUE);
|
||||
}
|
||||
|
||||
if (SDL_GameControllerHasRumble(gamecontroller)) {
|
||||
SDL_Log("Rumble supported");
|
||||
}
|
||||
|
||||
if (SDL_GameControllerHasRumbleTriggers(gamecontroller)) {
|
||||
SDL_Log("Trigger rumble supported");
|
||||
}
|
||||
|
||||
UpdateWindowTitle();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue