Single thread + inputs

This commit is contained in:
Marc
2023-01-21 12:09:39 +01:00
parent 8a93d29021
commit 41792a17d3
6 changed files with 176 additions and 52 deletions
+16
View File
@@ -0,0 +1,16 @@
#ifndef __INPUT_H__
#define __INPUT_H__
#include <SDL2/SDL_scancode.h>
typedef void(*keyEvent_t)(void);
//renderer facing
void input_init(void);
void input_poll(SDL_Scancode);
//user facing
void input_listen(SDL_Scancode code, keyEvent_t);
void input_removeListener(SDL_Scancode code, keyEvent_t handler);
#endif