Commit 0585865e authored by James's avatar James
Browse files

Work around ambiguity for std::abs

parent d90c2402
......@@ -2,6 +2,8 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <cmath>
#include <glad/glad.h>
#include "citra_libretro/core_settings.h"
......@@ -103,10 +105,13 @@ void MouseTracker::Update(int bufferWidth, int bufferHeight,
INT16_MAX);
// Deadzone the controller inputs
if (std::abs(controllerX) < LibRetro::settings.deadzone) {
float smoothedX = std::abs(controllerX);
float smoothedY = std::abs(controllerY);
if (smoothedX < LibRetro::settings.deadzone) {
controllerX = 0;
}
if (std::abs(controllerY) < LibRetro::settings.deadzone) {
if (smoothedY < LibRetro::settings.deadzone) {
controllerY = 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment