Commit 9fa8d6d0bea18300f079f347ac43d5400bc01435

Sam Lantinga 2020-06-08T17:07:55

Define constants not available on older kernels

diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c
index f5d9452..45b7960 100644
--- a/src/joystick/linux/SDL_sysjoystick.c
+++ b/src/joystick/linux/SDL_sysjoystick.c
@@ -52,6 +52,30 @@
 #ifndef SYN_DROPPED
 #define SYN_DROPPED 3
 #endif
+#ifndef BTN_SOUTH
+#define BTN_SOUTH       0x130
+#endif
+#ifndef BTN_EAST
+#define BTN_EAST        0x131
+#endif
+#ifndef BTN_NORTH
+#define BTN_NORTH       0x133
+#endif
+#ifndef BTN_WEST
+#define BTN_WEST        0x134
+#endif
+#ifndef BTN_DPAD_UP
+#define BTN_DPAD_UP     0x220
+#endif
+#ifndef BTN_DPAD_DOWN
+#define BTN_DPAD_DOWN   0x221
+#endif
+#ifndef BTN_DPAD_LEFT
+#define BTN_DPAD_LEFT   0x222
+#endif
+#ifndef BTN_DPAD_RIGHT
+#define BTN_DPAD_RIGHT  0x223
+#endif
 
 #include "../../core/linux/SDL_udev.h"