From b554d32cf3a38f701465dbe8e588676be6352cfb Mon Sep 17 00:00:00 2001 From: pixl Date: Fri, 21 Aug 2020 21:02:24 -0400 Subject: [PATCH] Fix InputDevice on distros without hires axes --- src/logid/InputDevice.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/logid/InputDevice.cpp b/src/logid/InputDevice.cpp index 1f9c8f1..30b448b 100644 --- a/src/logid/InputDevice.cpp +++ b/src/logid/InputDevice.cpp @@ -17,7 +17,6 @@ */ #include -#include #include "InputDevice.h" @@ -93,10 +92,15 @@ uint InputDevice::toAxisCode(const std::string& name) /* Returns -1 if axis_code is not hi-res */ int InputDevice::getLowResAxis(const uint axis_code) { + /* Some systems don't have these hi-res axes */ +#ifdef REL_WHEEL_HI_RES if(axis_code == REL_WHEEL_HI_RES) return REL_WHEEL; +#endif +#ifdef REL_HWHEEL_HI_RES if(axis_code == REL_HWHEEL_HI_RES) return REL_HWHEEL; +#endif return -1; }