diff options
author | Lioncash <mathew1800@gmail.com> | 2018-04-20 05:01:50 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-04-20 16:14:13 +0200 |
commit | fae2dd034462c5a6b086e46b3437ea6e2456d5eb (patch) | |
tree | 3a53e7b4786e4712874d63a2a1cecc6755475051 /src/input_common | |
parent | Merge pull request #356 from lioncash/shader (diff) | |
download | yuzu-fae2dd034462c5a6b086e46b3437ea6e2456d5eb.tar yuzu-fae2dd034462c5a6b086e46b3437ea6e2456d5eb.tar.gz yuzu-fae2dd034462c5a6b086e46b3437ea6e2456d5eb.tar.bz2 yuzu-fae2dd034462c5a6b086e46b3437ea6e2456d5eb.tar.lz yuzu-fae2dd034462c5a6b086e46b3437ea6e2456d5eb.tar.xz yuzu-fae2dd034462c5a6b086e46b3437ea6e2456d5eb.tar.zst yuzu-fae2dd034462c5a6b086e46b3437ea6e2456d5eb.zip |
Diffstat (limited to 'src/input_common')
-rw-r--r-- | src/input_common/motion_emu.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/input_common/motion_emu.cpp b/src/input_common/motion_emu.cpp index 59a035e70..caffe48cb 100644 --- a/src/input_common/motion_emu.cpp +++ b/src/input_common/motion_emu.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <algorithm> #include <chrono> #include <mutex> #include <thread> @@ -43,8 +44,8 @@ public: tilt_angle = 0; } else { tilt_direction = mouse_move.Cast<float>(); - tilt_angle = MathUtil::Clamp(tilt_direction.Normalize() * sensitivity, 0.0f, - MathUtil::PI * 0.5f); + tilt_angle = + std::clamp(tilt_direction.Normalize() * sensitivity, 0.0f, MathUtil::PI * 0.5f); } } } |