Kaynağa Gözat

Define constants not available on older kernels

Sam Lantinga 4 yıl önce
ebeveyn
işleme
9fa8d6d0be
1 değiştirilmiş dosya ile 24 ekleme ve 0 silme
  1. 24 0
      src/joystick/linux/SDL_sysjoystick.c

+ 24 - 0
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"