From a610eddd9710f54c46b746596b3629e4ad555b56 Mon Sep 17 00:00:00 2001 From: armin-25689 <83564821+armin-25689@users.noreply.github.com> Date: Sun, 31 Dec 2023 15:26:58 +0800 Subject: [PATCH] build: change header file and __s32 type for FreeBSD --- src/input/evdev.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/input/evdev.c b/src/input/evdev.c index 9a7fe78..ea302a4 100644 --- a/src/input/evdev.c +++ b/src/input/evdev.c @@ -38,7 +38,11 @@ #include #include #include +#ifdef __linux__ #include +#else +#include +#endif #include #if __BYTE_ORDER == __LITTLE_ENDIAN @@ -66,8 +70,13 @@ struct input_device { int hats_state[3][2]; int fd; char modifiers; + #ifdef __linux__ __s32 mouseDeltaX, mouseDeltaY, mouseVScroll, mouseHScroll; __s32 touchDownX, touchDownY, touchX, touchY; + #else + int32_t mouseDeltaX, mouseDeltaY, mouseVScroll, mouseHScroll; + int32_t touchDownX, touchDownY, touchX, touchY; + #endif struct timeval touchDownTime; struct timeval btnDownTime; short controllerId;