From 879fb2adefadbc5f38711cd8f01bcc4cee053e3d Mon Sep 17 00:00:00 2001 From: jacopo grandi Date: Tue, 2 Mar 2021 09:44:19 +0100 Subject: i hate cmake, g++, ld, collect2, cc1, x86_64-w64-mingw32 --- mkb/mkb.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mkb/mkb.c') diff --git a/mkb/mkb.c b/mkb/mkb.c index 169aa8c..c9291da 100644 --- a/mkb/mkb.c +++ b/mkb/mkb.c @@ -1,17 +1,17 @@ -#include +#include "mkb.h" -bool mkb_search(MKb *mkb, SDL_Scancode scancode) { +int mkb_search(MKb *mkb, SDL_Scancode scancode) { for (int i=0; ikbnum; 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) { -- cgit v1.2.3-54-g00ecf