ソースを参照

Use the correct type for the modifier in SDL_Keysym

This shrinks the structure by 32-bits because we've removed implicit padding between the fields
Sam Lantinga 1 年間 前
コミット
026edbeab0
1 ファイル変更2 行追加2 行削除
  1. 2 2
      include/SDL3/SDL_keyboard.h

+ 2 - 2
include/SDL3/SDL_keyboard.h

@@ -64,8 +64,8 @@ typedef struct SDL_Keysym
 {
 {
     SDL_Scancode scancode;      /**< SDL physical key code - see ::SDL_Scancode for details */
     SDL_Scancode scancode;      /**< SDL physical key code - see ::SDL_Scancode for details */
     SDL_Keycode sym;            /**< SDL virtual key code - see ::SDL_Keycode for details */
     SDL_Keycode sym;            /**< SDL virtual key code - see ::SDL_Keycode for details */
-    Uint16 mod;                 /**< current key modifiers */
-    Uint32 unused;
+    SDL_Keymod mod;             /**< current key modifiers */
+    Uint16 unused;
 } SDL_Keysym;
 } SDL_Keysym;
 
 
 /* Function prototypes */
 /* Function prototypes */