diff options
| author | 2020-11-19 11:30:52 -0600 | |
|---|---|---|
| committer | 2020-11-19 11:30:52 -0600 | |
| commit | 5b6545b1410e2fa907d12f13d37ef710be654c2a (patch) | |
| tree | 54a0a44b3ec126ac5ca0514dcd4fb7b2891cde0e /src/input_common/sdl/sdl_impl.cpp | |
| parent | Merge pull request #4936 from lioncash/page (diff) | |
| download | yuzu-5b6545b1410e2fa907d12f13d37ef710be654c2a.tar.gz yuzu-5b6545b1410e2fa907d12f13d37ef710be654c2a.tar.xz yuzu-5b6545b1410e2fa907d12f13d37ef710be654c2a.zip | |
Modify rumble amplification
Diffstat (limited to 'src/input_common/sdl/sdl_impl.cpp')
| -rw-r--r-- | src/input_common/sdl/sdl_impl.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp index 8c48bb861..c395d96cf 100644 --- a/src/input_common/sdl/sdl_impl.cpp +++ b/src/input_common/sdl/sdl_impl.cpp | |||
| @@ -402,8 +402,7 @@ public: | |||
| 402 | 402 | ||
| 403 | bool SetRumblePlay(f32 amp_low, f32 freq_low, f32 amp_high, f32 freq_high) const override { | 403 | bool SetRumblePlay(f32 amp_low, f32 freq_low, f32 amp_high, f32 freq_high) const override { |
| 404 | const auto process_amplitude = [](f32 amplitude) { | 404 | const auto process_amplitude = [](f32 amplitude) { |
| 405 | return static_cast<u16>(std::pow(amplitude, 0.5f) * | 405 | return static_cast<u16>((amplitude + std::pow(amplitude, 0.3f)) * 0.5f * 0xFFFF); |
| 406 | (3.0f - 2.0f * std::pow(amplitude, 0.15f)) * 0xFFFF); | ||
| 407 | }; | 406 | }; |
| 408 | 407 | ||
| 409 | const auto processed_amp_low = process_amplitude(amp_low); | 408 | const auto processed_amp_low = process_amplitude(amp_low); |