diff options
author | jacopo grandi <jak.sk8@hotmail.it> | 2021-03-02 09:44:19 +0100 |
---|---|---|
committer | jacopo grandi <jak.sk8@hotmail.it> | 2021-03-02 09:44:19 +0100 |
commit | 879fb2adefadbc5f38711cd8f01bcc4cee053e3d (patch) | |
tree | 63d9841f0dd321978714dd5839cb6f8c3c8df57e /mkb/mkb.c | |
parent | 2f345b1d6e130177efe4fa47d5b2bd11f352ce85 (diff) |
i hate cmake, g++, ld, collect2, cc1, x86_64-w64-mingw32
Diffstat (limited to 'mkb/mkb.c')
-rw-r--r-- | mkb/mkb.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1,17 +1,17 @@ -#include <mkb.h> +#include "mkb.h" -bool mkb_search(MKb *mkb, SDL_Scancode scancode) { +int mkb_search(MKb *mkb, SDL_Scancode scancode) { for (int i=0; i<mkb->kbnum; i++) { if (mkb->kb[i] == scancode) - return true; + return 1; } - return false; + return 0; } -bool mkb_statesearch (MKb *mkb, SDL_Scancode scancode) { +int mkb_statesearch (MKb *mkb, SDL_Scancode scancode) { const Uint8 *state = SDL_GetKeyboardState(NULL); - if (state[scancode]) return true; - return false; + if (state[scancode]) return 1; + return 0; } void mkb_init(MKb *mkb) { |