diff options
author | bunnei <bunneidev@gmail.com> | 2022-10-24 02:25:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-24 02:25:18 +0200 |
commit | 0313ee77936a696f9135a31ac0b644e6ffe49ae8 (patch) | |
tree | b9e4a934447468338c60add33375409341f5bc7d /src/input_common/drivers | |
parent | Merge pull request #9095 from FernandoS27/meat-good-vegetable-bad (diff) | |
parent | CMakeLists: Disable -Wbraced-scalar-init on Clang (diff) | |
download | yuzu-0313ee77936a696f9135a31ac0b644e6ffe49ae8.tar yuzu-0313ee77936a696f9135a31ac0b644e6ffe49ae8.tar.gz yuzu-0313ee77936a696f9135a31ac0b644e6ffe49ae8.tar.bz2 yuzu-0313ee77936a696f9135a31ac0b644e6ffe49ae8.tar.lz yuzu-0313ee77936a696f9135a31ac0b644e6ffe49ae8.tar.xz yuzu-0313ee77936a696f9135a31ac0b644e6ffe49ae8.tar.zst yuzu-0313ee77936a696f9135a31ac0b644e6ffe49ae8.zip |
Diffstat (limited to 'src/input_common/drivers')
-rw-r--r-- | src/input_common/drivers/sdl_driver.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp index b72e4b397..c175a8853 100644 --- a/src/input_common/drivers/sdl_driver.cpp +++ b/src/input_common/drivers/sdl_driver.cpp @@ -40,8 +40,8 @@ public: void EnableMotion() { if (sdl_controller) { SDL_GameController* controller = sdl_controller.get(); - has_accel = SDL_GameControllerHasSensor(controller, SDL_SENSOR_ACCEL); - has_gyro = SDL_GameControllerHasSensor(controller, SDL_SENSOR_GYRO); + has_accel = SDL_GameControllerHasSensor(controller, SDL_SENSOR_ACCEL) == SDL_TRUE; + has_gyro = SDL_GameControllerHasSensor(controller, SDL_SENSOR_GYRO) == SDL_TRUE; if (has_accel) { SDL_GameControllerSetSensorEnabled(controller, SDL_SENSOR_ACCEL, SDL_TRUE); } |