Wei Mingzhi 12 年之前
父节点
当前提交
b65c8c854d
共有 1 个文件被更改,包括 13 次插入0 次删除
  1. 13 0
      common.h

+ 13 - 0
common.h

@@ -47,6 +47,19 @@ extern "C"
 #define realloc      SDL_realloc
 #endif
 
+#if SDL_VERSION_ATLEAST(2,0,0)
+#define SDLK_KP1     SDLK_KP_1
+#define SDLK_KP2     SDLK_KP_2
+#define SDLK_KP3     SDLK_KP_3
+#define SDLK_KP4     SDLK_KP_4
+#define SDLK_KP5     SDLK_KP_5
+#define SDLK_KP6     SDLK_KP_6
+#define SDLK_KP7     SDLK_KP_7
+#define SDLK_KP8     SDLK_KP_8
+#define SDLK_KP9     SDLK_KP_9
+#define SDLK_KP0     SDLK_KP_0
+#endif
+
 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
 #define SWAP16(X)    (X)
 #define SWAP32(X)    (X)