From c5f6ca6beb4a4bd88dde5cb41891d978dd7e96a9 Mon Sep 17 00:00:00 2001 From: Paul_Arutyunov Date: Sat, 13 Oct 2018 13:45:48 +0300 Subject: [PATCH] Handle arrow keys --- src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.c b/src/main.c index c5c62cd..268e7d8 100644 --- a/src/main.c +++ b/src/main.c @@ -39,18 +39,22 @@ get_new_key:; switch (value) { case 'h': case 'a': + case INPUT_LEFT: direction = dir_left; break; case 'l': case 'd': + case INPUT_RIGHT: direction = dir_right; break; case 'j': case 's': + case INPUT_DOWN: direction = dir_down; break; case 'k': case 'w': + case INPUT_UP: direction = dir_up; break; case 'q':