1
0
mirror of https://github.com/pevans/erc-c.git synced 2026-04-26 04:17:57 +00:00

Allow access to the last key pressed and key_pressed status

This commit is contained in:
Peter Evans
2018-01-16 23:42:10 -06:00
parent 05e95d7798
commit b1177784a0
2 changed files with 67 additions and 0 deletions
+8
View File
@@ -29,9 +29,17 @@ typedef struct {
*/
int xcoords;
int ycoords;
/*
* This is true when a key is pressed, and false if not. We
* determine this from an SDL_PollEvent() call.
*/
bool key_pressed;
} vm_screen;
extern bool vm_screen_active(vm_screen *);
extern bool vm_screen_key_pressed(vm_screen *);
extern char vm_screen_last_key(vm_screen *);
extern int vm_screen_add_window(vm_screen *, int, int);
extern int vm_screen_init();
extern int vm_screen_xcoords(vm_screen *);