summaryrefslogtreecommitdiffstats
path: root/src/input_common/sdl/sdl_impl.cpp
diff options
context:
space:
mode:
authorLC <mathew1800@gmail.com>2020-11-20 06:40:09 +0100
committerGitHub <noreply@github.com>2020-11-20 06:40:09 +0100
commitbba7e8ea4b5c8e0dbac9f075d692afae0b05fd73 (patch)
tree444df1fe92e31659f5a661a2268b5f2b3c632ca7 /src/input_common/sdl/sdl_impl.cpp
parentMerge pull request #4952 from ReinUsesLisp/bit-cast (diff)
parentModify rumble amplification (diff)
downloadyuzu-bba7e8ea4b5c8e0dbac9f075d692afae0b05fd73.tar
yuzu-bba7e8ea4b5c8e0dbac9f075d692afae0b05fd73.tar.gz
yuzu-bba7e8ea4b5c8e0dbac9f075d692afae0b05fd73.tar.bz2
yuzu-bba7e8ea4b5c8e0dbac9f075d692afae0b05fd73.tar.lz
yuzu-bba7e8ea4b5c8e0dbac9f075d692afae0b05fd73.tar.xz
yuzu-bba7e8ea4b5c8e0dbac9f075d692afae0b05fd73.tar.zst
yuzu-bba7e8ea4b5c8e0dbac9f075d692afae0b05fd73.zip
Diffstat (limited to 'src/input_common/sdl/sdl_impl.cpp')
-rw-r--r--src/input_common/sdl/sdl_impl.cpp3
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:
bool SetRumblePlay(f32 amp_low, f32 freq_low, f32 amp_high, f32 freq_high) const override {
const auto process_amplitude = [](f32 amplitude) {
- return static_cast<u16>(std::pow(amplitude, 0.5f) *
- (3.0f - 2.0f * std::pow(amplitude, 0.15f)) * 0xFFFF);
+ return static_cast<u16>((amplitude + std::pow(amplitude, 0.3f)) * 0.5f * 0xFFFF);
};
const auto processed_amp_low = process_amplitude(amp_low);