diff options
Diffstat (limited to '')
-rw-r--r-- | 2048.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/2048.c b/2048.c index 260f67e..d2e44bb 100644 --- a/2048.c +++ b/2048.c @@ -260,7 +260,9 @@ static void drawGameOver(void) { } static bool input(void) { - switch (getch()) { + int ch = getch(); + if (ch == ERR) ch = getch(); + switch (ch) { break; case 'h': case KEY_LEFT: if (left()) spawn(); break; case 'j': case KEY_DOWN: if (down()) spawn(); break; case 'k': case KEY_UP: if (up()) spawn(); |