diff options
Diffstat (limited to 'src/input_common/drivers/sdl_driver.cpp')
| -rw-r--r-- | src/input_common/drivers/sdl_driver.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp index 88cacd615..53ebae2d6 100644 --- a/src/input_common/drivers/sdl_driver.cpp +++ b/src/input_common/drivers/sdl_driver.cpp | |||
| @@ -63,7 +63,7 @@ public: | |||
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | bool UpdateMotion(SDL_ControllerSensorEvent event) { | 65 | bool UpdateMotion(SDL_ControllerSensorEvent event) { |
| 66 | constexpr float gravity_constant = 9.80665f; | 66 | constexpr static float gravity_constant = 9.80665f; |
| 67 | std::scoped_lock lock{mutex}; | 67 | std::scoped_lock lock{mutex}; |
| 68 | const u64 time_difference = event.timestamp - last_motion_update; | 68 | const u64 time_difference = event.timestamp - last_motion_update; |
| 69 | last_motion_update = event.timestamp; | 69 | last_motion_update = event.timestamp; |
| @@ -109,7 +109,7 @@ public: | |||
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | bool RumblePlay(const Common::Input::VibrationStatus vibration) { | 111 | bool RumblePlay(const Common::Input::VibrationStatus vibration) { |
| 112 | constexpr u32 rumble_max_duration_ms = 1000; | 112 | constexpr static u32 rumble_max_duration_ms = 1000; |
| 113 | if (sdl_controller) { | 113 | if (sdl_controller) { |
| 114 | return SDL_GameControllerRumble( | 114 | return SDL_GameControllerRumble( |
| 115 | sdl_controller.get(), static_cast<u16>(vibration.low_amplitude), | 115 | sdl_controller.get(), static_cast<u16>(vibration.low_amplitude), |
| @@ -616,7 +616,7 @@ bool SDLDriver::IsVibrationEnabled(const PadIdentifier& identifier) { | |||
| 616 | const auto joystick = | 616 | const auto joystick = |
| 617 | GetSDLJoystickByGUID(identifier.guid.RawString(), static_cast<int>(identifier.port)); | 617 | GetSDLJoystickByGUID(identifier.guid.RawString(), static_cast<int>(identifier.port)); |
| 618 | 618 | ||
| 619 | constexpr Common::Input::VibrationStatus test_vibration{ | 619 | constexpr static Common::Input::VibrationStatus test_vibration{ |
| 620 | .low_amplitude = 1, | 620 | .low_amplitude = 1, |
| 621 | .low_frequency = 160.0f, | 621 | .low_frequency = 160.0f, |
| 622 | .high_amplitude = 1, | 622 | .high_amplitude = 1, |
| @@ -624,7 +624,7 @@ bool SDLDriver::IsVibrationEnabled(const PadIdentifier& identifier) { | |||
| 624 | .type = Common::Input::VibrationAmplificationType::Exponential, | 624 | .type = Common::Input::VibrationAmplificationType::Exponential, |
| 625 | }; | 625 | }; |
| 626 | 626 | ||
| 627 | constexpr Common::Input::VibrationStatus zero_vibration{ | 627 | constexpr static Common::Input::VibrationStatus zero_vibration{ |
| 628 | .low_amplitude = 0, | 628 | .low_amplitude = 0, |
| 629 | .low_frequency = 160.0f, | 629 | .low_frequency = 160.0f, |
| 630 | .high_amplitude = 0, | 630 | .high_amplitude = 0, |