Explorar o código

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

Sam Lantinga %!s(int64=4) %!d(string=hai) anos
pai
achega
65ff00ec1b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      test/testgamecontroller.c

+ 1 - 1
test/testgamecontroller.c

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