Implemented key_is_down() function.

This commit is contained in:
Nicolás Ortega Froysa
2018-03-25 15:29:48 +02:00
parent ea4f4a97b6
commit d871bcec41
2 changed files with 9 additions and 1 deletions

View File

@ -132,3 +132,10 @@ void handle_event() {
break;
}
}
int key_is_down(int code) {
if(code < 0 || code >= KEY_MAX)
return -1;
else
return keys[code];
}