joystick: Add APIs to query rumble support

This commit is contained in:
Cameron Gutman 2021-11-11 15:53:11 -06:00 committed by Sam Lantinga
parent afccabb881
commit fe09a4930a
8 changed files with 134 additions and 9 deletions

View file

@ -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();
}