diff options
author | bunnei <bunneidev@gmail.com> | 2021-12-14 01:50:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 01:50:54 +0100 |
commit | ad45963b459d07d04e78f86d3316d7494730e9f9 (patch) | |
tree | a2e70a6ffad04ec840e4ff3cd581d7a4ec5853fa /src/input_common/drivers/gc_adapter.cpp | |
parent | Merge pull request #7576 from lioncash/tasenum (diff) | |
parent | input_engine: Fix typo in TriggerOnAxisChange() parameter name (diff) | |
download | yuzu-ad45963b459d07d04e78f86d3316d7494730e9f9.tar yuzu-ad45963b459d07d04e78f86d3316d7494730e9f9.tar.gz yuzu-ad45963b459d07d04e78f86d3316d7494730e9f9.tar.bz2 yuzu-ad45963b459d07d04e78f86d3316d7494730e9f9.tar.lz yuzu-ad45963b459d07d04e78f86d3316d7494730e9f9.tar.xz yuzu-ad45963b459d07d04e78f86d3316d7494730e9f9.tar.zst yuzu-ad45963b459d07d04e78f86d3316d7494730e9f9.zip |
Diffstat (limited to 'src/input_common/drivers/gc_adapter.cpp')
-rw-r--r-- | src/input_common/drivers/gc_adapter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input_common/drivers/gc_adapter.cpp b/src/input_common/drivers/gc_adapter.cpp index 8b6574223..7ab4540a8 100644 --- a/src/input_common/drivers/gc_adapter.cpp +++ b/src/input_common/drivers/gc_adapter.cpp @@ -69,7 +69,7 @@ private: libusb_device_handle* handle{}; }; -GCAdapter::GCAdapter(const std::string& input_engine_) : InputEngine(input_engine_) { +GCAdapter::GCAdapter(std::string input_engine_) : InputEngine(std::move(input_engine_)) { if (usb_adapter_handle) { return; } @@ -325,8 +325,8 @@ bool GCAdapter::GetGCEndpoint(libusb_device* device) { return true; } -Common::Input::VibrationError GCAdapter::SetRumble(const PadIdentifier& identifier, - const Common::Input::VibrationStatus vibration) { +Common::Input::VibrationError GCAdapter::SetRumble( + const PadIdentifier& identifier, const Common::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); |