Fix Linux CLI keyboard input bug due to mismatched types

This commit is contained in:
Lino5000 2022-05-30 17:27:52 +10:00 committed by rofl0r
parent ba05516b7d
commit c68cc14f16
2 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@
u16 keyboard_cfg[NB_KEYS]; u32 keyboard_cfg[NB_KEYS];
u16 joypad_cfg[NB_KEYS]; u16 joypad_cfg[NB_KEYS];
u16 nbr_joy; u16 nbr_joy;
mouse_status mouse; mouse_status mouse;
@ -171,7 +171,7 @@ u16 lookup_joy_key (u16 keyval) {
} }
/* Return keypad vector with given key set to 1 */ /* Return keypad vector with given key set to 1 */
u16 lookup_key (u16 keyval) { u32 lookup_key (u32 keyval) {
int i; int i;
u16 Key = 0; u16 Key = 0;

View File

@ -64,7 +64,7 @@
/* Keypad key names */ /* Keypad key names */
extern const char *key_names[NB_KEYS]; extern const char *key_names[NB_KEYS];
/* Current keyboard configuration */ /* Current keyboard configuration */
extern u16 keyboard_cfg[NB_KEYS]; extern u32 keyboard_cfg[NB_KEYS];
/* Current joypad configuration */ /* Current joypad configuration */
extern u16 joypad_cfg[NB_KEYS]; extern u16 joypad_cfg[NB_KEYS];
/* Number of detected joypads */ /* Number of detected joypads */
@ -103,7 +103,7 @@ u16 get_joy_key(int index);
u16 get_set_joy_key(int index); u16 get_set_joy_key(int index);
void update_keypad(u16 keys); void update_keypad(u16 keys);
u16 get_keypad( void); u16 get_keypad( void);
u16 lookup_key (u16 keyval); u32 lookup_key (u32 keyval);
u16 lookup_joy_key (u16 keyval); u16 lookup_joy_key (u16 keyval);
void void
process_ctrls_event( SDL_Event& event, process_ctrls_event( SDL_Event& event,