diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_key_events.c | 7 |
1 files changed, 4 insertions, 3 deletions
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); } |