kernels,typing-game: exit when pressing ESC
This commit is contained in:
parent
fa054f1c3a
commit
9e59fd2cba
1 changed files with 1 additions and 0 deletions
|
@ -159,6 +159,7 @@ int main() {
|
|||
while (1) {
|
||||
AM_INPUT_KEYBRD_T ev = io_read(AM_INPUT_KEYBRD);
|
||||
if (ev.keycode == AM_KEY_NONE) break;
|
||||
if (ev.keydown && ev.keycode == AM_KEY_ESCAPE) halt(0);
|
||||
if (ev.keydown && lut[ev.keycode]) {
|
||||
check_hit(lut[ev.keycode]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue