diff options
| author | Joshua Vandaƫle <joshua@vandaele.software> | 2026-06-28 08:33:40 +0200 |
|---|---|---|
| committer | Joshua Vandaƫle <joshua@vandaele.software> | 2026-07-13 02:32:33 +0200 |
| commit | 6dcb0817a2cd1a507dbf5e3c42bf13623b5b5cae (patch) | |
| tree | 3da2430b2edd92a2af41ee010b82da2b8ef09968 /Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp | |
| parent | 774200dcf4ccea148ef357cc8cf86d8eab4446da (diff) | |
MathUtil: C++20/23 modernisations
I've also created DegreesToRadians/RadiansToDegrees utility functions since there was a lot of repeated code
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp index bb51d0026e..c7498e50c7 100644 --- a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp +++ b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp @@ -538,7 +538,7 @@ bool evdevDevice::AddNode(std::string devnode, int fd, libevdev* dev) // evdev resolution is specified in "g"s and deg/s. // Convert these to m/s/s and rad/s. constexpr ControlState accel_scale = MathUtil::GRAVITY_ACCELERATION; - constexpr ControlState gyro_scale = MathUtil::TAU / 360; + constexpr ControlState gyro_scale = MathUtil::DegreesToRadians(ControlState{1}); add_motion_inputs(ABS_X, accel_scale); add_motion_inputs(ABS_RX, gyro_scale); |
