diff options
| author | 2023-02-14 11:13:47 -0500 | |
|---|---|---|
| committer | 2023-02-14 12:35:39 -0500 | |
| commit | 683019878fc939b418a65e1c5d84b066596d7655 (patch) | |
| tree | 6b2a2e8ea34cb00a3fccf3613a52475550997035 /src/input_common/drivers/sdl_driver.cpp | |
| parent | apply clang-format (diff) | |
| download | yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.gz yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.xz yuzu-683019878fc939b418a65e1c5d84b066596d7655.zip | |
remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency
Signed-off-by: arades79 <scravers@protonmail.com>
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 53ebae2d6..5c20b3426 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 static float gravity_constant = 9.80665f; | 66 | constexpr 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 static u32 rumble_max_duration_ms = 1000; | 112 | constexpr 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 static Common::Input::VibrationStatus test_vibration{ | 619 | static constexpr 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 static Common::Input::VibrationStatus zero_vibration{ | 627 | static constexpr 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, |