From 7768d43410b72815c241b74e46476a4896f12b41 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Sun, 9 Feb 2020 14:55:43 +0100 Subject: Smooth --- src/ft_key_events.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/ft_key_events.c') diff --git a/src/ft_key_events.c b/src/ft_key_events.c index 1b4b738..168d6c0 100644 --- a/src/ft_key_events.c +++ b/src/ft_key_events.c @@ -76,7 +76,7 @@ static int } int - ft_key_event(int keycode, void *param) + ft_key_event(int keycode, t_cub *clist) { int (*fun_ptr[4])(t_cub*); const int8_t tmp_code = keycode; @@ -90,8 +90,9 @@ int (tmp_code == FT_A_KEY) ? (keycode = 1) : 0; (tmp_code == FT_S_KEY) ? (keycode = 2) : 0; (tmp_code == FT_D_KEY) ? (keycode = 3) : 0; - (keycode <= 3) ? ((*fun_ptr[keycode])((t_cub*)param)) : 0; + if (keycode <= 3) + return (*fun_ptr[keycode])(clist); if (keycode == FT_ESC_KEY) - ft_exit(0, ((t_cub*)param)); + return (ft_exit(0, (clist))); return (0); } -- cgit v1.2.3