Query the rate for the correct sensor (thanks @meyraud705)

main
Sam Lantinga 2021-07-29 14:18:54 -07:00
parent 72ee0ccdd5
commit 65ff00ec1b
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ static void AddController(int device_index, SDL_bool verbose)
if (SDL_GameControllerHasSensor(gamecontroller, SDL_SENSOR_GYRO)) {
if (verbose) {
SDL_Log("Enabling gyro at %.2f Hz\n", SDL_GameControllerGetSensorDataRate(gamecontroller, SDL_SENSOR_ACCEL));
SDL_Log("Enabling gyro at %.2f Hz\n", SDL_GameControllerGetSensorDataRate(gamecontroller, SDL_SENSOR_GYRO));
}
SDL_GameControllerSetSensorEnabled(gamecontroller, SDL_SENSOR_GYRO, SDL_TRUE);
}