diff options
| author | 2020-11-20 00:40:09 -0500 | |
|---|---|---|
| committer | 2020-11-20 00:40:09 -0500 | |
| commit | bba7e8ea4b5c8e0dbac9f075d692afae0b05fd73 (patch) | |
| tree | 444df1fe92e31659f5a661a2268b5f2b3c632ca7 /src/input_common/gcadapter/gc_poller.cpp | |
| parent | Merge pull request #4952 from ReinUsesLisp/bit-cast (diff) | |
| parent | Modify rumble amplification (diff) | |
| download | yuzu-bba7e8ea4b5c8e0dbac9f075d692afae0b05fd73.tar.gz yuzu-bba7e8ea4b5c8e0dbac9f075d692afae0b05fd73.tar.xz yuzu-bba7e8ea4b5c8e0dbac9f075d692afae0b05fd73.zip | |
Merge pull request #4950 from german77/RumbleStrenght
Modify rumble amplification
Diffstat (limited to 'src/input_common/gcadapter/gc_poller.cpp')
| -rw-r--r-- | src/input_common/gcadapter/gc_poller.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input_common/gcadapter/gc_poller.cpp b/src/input_common/gcadapter/gc_poller.cpp index fe57c13a5..d95574bb5 100644 --- a/src/input_common/gcadapter/gc_poller.cpp +++ b/src/input_common/gcadapter/gc_poller.cpp | |||
| @@ -302,8 +302,8 @@ public: | |||
| 302 | 302 | ||
| 303 | bool SetRumblePlay(f32 amp_low, f32 freq_low, f32 amp_high, f32 freq_high) const override { | 303 | bool SetRumblePlay(f32 amp_low, f32 freq_low, f32 amp_high, f32 freq_high) const override { |
| 304 | const auto mean_amplitude = (amp_low + amp_high) * 0.5f; | 304 | const auto mean_amplitude = (amp_low + amp_high) * 0.5f; |
| 305 | const auto processed_amplitude = static_cast<u8>( | 305 | const auto processed_amplitude = |
| 306 | pow(mean_amplitude, 0.5f) * (3.0f - 2.0f * pow(mean_amplitude, 0.15f)) * 0x8); | 306 | static_cast<u8>((mean_amplitude + std::pow(mean_amplitude, 0.3f)) * 0.5f * 0x8); |
| 307 | 307 | ||
| 308 | return gcadapter->RumblePlay(port, processed_amplitude); | 308 | return gcadapter->RumblePlay(port, processed_amplitude); |
| 309 | } | 309 | } |