From dada4b12f07388262729a1b979e53e28bfb79db3 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Thu, 23 Jan 2020 18:46:55 +0100 Subject: Nice squares --- src/ft_key_events.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/ft_key_events.c') diff --git a/src/ft_key_events.c b/src/ft_key_events.c index 82235fc..6702988 100644 --- a/src/ft_key_events.c +++ b/src/ft_key_events.c @@ -5,28 +5,28 @@ static int ft_w_key(void) { - ft_printf("w\n"); + ft_printf("[W]\n"); return (0); } static int ft_a_key(void) { - ft_printf("a\n"); + ft_printf("[A]\n"); return (0); } static int ft_s_key(void) { - ft_printf("s\n"); + ft_printf("[S]\n"); return (0); } static int ft_d_key(void) { - ft_printf("d\n"); + ft_printf("[D]\n"); return (0); } @@ -44,11 +44,10 @@ ft_key_event(int keycode, void *param) (keycode <= 3) ? ((*fun_ptr[keycode])()) : 0; if (keycode == 53) { - ft_memdel(((t_winlist*)param)->wlx); - ft_memdel(((t_winlist*)param)->winptr); - ft_memdel((t_winlist*)param); - ft_printf("Exiting program\n"); - exit(0); + ft_memdel(((t_win*)param)->wlx); + ft_memdel(((t_win*)param)->winptr); + ft_memdel((t_win*)param); + ft_exit(0); } return (0); } -- cgit v1.2.3