diff options
author | german77 <juangerman-13@hotmail.com> | 2021-10-16 02:07:47 +0200 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2021-11-25 03:30:24 +0100 |
commit | e0da5c1bbcdf85676f968b63c8ae2587f0464193 (patch) | |
tree | 588837d1181d6b9d3bd4536fd4d2c5877335632d /src/input_common/drivers/gc_adapter.cpp | |
parent | core/hid: Add output devices (diff) | |
download | yuzu-e0da5c1bbcdf85676f968b63c8ae2587f0464193.tar yuzu-e0da5c1bbcdf85676f968b63c8ae2587f0464193.tar.gz yuzu-e0da5c1bbcdf85676f968b63c8ae2587f0464193.tar.bz2 yuzu-e0da5c1bbcdf85676f968b63c8ae2587f0464193.tar.lz yuzu-e0da5c1bbcdf85676f968b63c8ae2587f0464193.tar.xz yuzu-e0da5c1bbcdf85676f968b63c8ae2587f0464193.tar.zst yuzu-e0da5c1bbcdf85676f968b63c8ae2587f0464193.zip |
Diffstat (limited to 'src/input_common/drivers/gc_adapter.cpp')
-rw-r--r-- | src/input_common/drivers/gc_adapter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/input_common/drivers/gc_adapter.cpp b/src/input_common/drivers/gc_adapter.cpp index 2aa5a16a6..4a56abb99 100644 --- a/src/input_common/drivers/gc_adapter.cpp +++ b/src/input_common/drivers/gc_adapter.cpp @@ -322,7 +322,8 @@ bool GCAdapter::GetGCEndpoint(libusb_device* device) { return true; } -Input::VibrationError GCAdapter::SetRumble(const PadIdentifier& identifier, const Input::VibrationStatus vibration) { +Input::VibrationError GCAdapter::SetRumble(const PadIdentifier& identifier, + const Input::VibrationStatus vibration) { const auto mean_amplitude = (vibration.low_amplitude + vibration.high_amplitude) * 0.5f; const auto processed_amplitude = static_cast<u8>((mean_amplitude + std::pow(mean_amplitude, 0.3f)) * 0.5f * 0x8); |