From 73106395ba9406391848cc85f6c713fdaedbb654 Mon Sep 17 00:00:00 2001 From: mcolonna Date: Tue, 9 Apr 2024 13:46:14 +0200 Subject: [PATCH] feat: esc to quit --- dev/TODO.md | 1 - src/main/input.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dev/TODO.md b/dev/TODO.md index b112721..9c27915 100644 --- a/dev/TODO.md +++ b/dev/TODO.md @@ -1,5 +1,4 @@ - Change sprites for top and bottom borders -- ESC to quit (what's the point) - Map conditions - 1 exit - 1+ collectibles diff --git a/src/main/input.c b/src/main/input.c index acca986..1cf1566 100644 --- a/src/main/input.c +++ b/src/main/input.c @@ -6,7 +6,7 @@ /* By: mcolonna +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/03/26 12:26:17 by mcolonna #+# #+# */ -/* Updated: 2024/04/02 14:41:14 by mcolonna ### ########.fr */ +/* Updated: 2024/04/09 13:44:46 by mcolonna ### ########.fr */ /* */ /* ************************************************************************** */ @@ -53,6 +53,8 @@ static void setkey(int keycode, bool value) int key_press_hook(int keycode) { + if (keycode == XK_Escape) + success(); setkey(keycode, true); return (0); }