summaryrefslogtreecommitdiffstats
path: root/src/input_common/drivers
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-10-16 02:07:47 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:24 +0100
commite0da5c1bbcdf85676f968b63c8ae2587f0464193 (patch)
tree588837d1181d6b9d3bd4536fd4d2c5877335632d /src/input_common/drivers
parentcore/hid: Add output devices (diff)
downloadyuzu-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')
-rw-r--r--src/input_common/drivers/gc_adapter.cpp3
-rw-r--r--src/input_common/drivers/gc_adapter.h2
-rw-r--r--src/input_common/drivers/sdl_driver.h2
3 files changed, 4 insertions, 3 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);
diff --git a/src/input_common/drivers/gc_adapter.h b/src/input_common/drivers/gc_adapter.h
index dd23dd9f3..dd0e4aa1d 100644
--- a/src/input_common/drivers/gc_adapter.h
+++ b/src/input_common/drivers/gc_adapter.h
@@ -25,7 +25,7 @@ public:
~GCAdapter();
Input::VibrationError SetRumble(const PadIdentifier& identifier,
- const Input::VibrationStatus vibration) override;
+ const Input::VibrationStatus vibration) override;
/// Used for automapping features
std::vector<Common::ParamPackage> GetInputDevices() const override;
diff --git a/src/input_common/drivers/sdl_driver.h b/src/input_common/drivers/sdl_driver.h
index f66b33c77..1ff85f48d 100644
--- a/src/input_common/drivers/sdl_driver.h
+++ b/src/input_common/drivers/sdl_driver.h
@@ -59,7 +59,7 @@ public:
u8 GetHatButtonId(const std::string direction_name) const override;
Input::VibrationError SetRumble(const PadIdentifier& identifier,
- const Input::VibrationStatus vibration) override;
+ const Input::VibrationStatus vibration) override;
private:
void InitJoystick(int joystick_index);