/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_key_release.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rbousset +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/17 18:43:56 by rbousset #+# #+# */ /* Updated: 2020/02/17 18:43:59 by rbousset ### ########lyon.fr */ /* */ /* ************************************************************************** */ #include #include #include static void ft_pop_key(uint16_t keycode, t_cub *clist) { uint8_t i; i = 0; while (i < 5) { if (clist->key_input[i] != keycode) clist->key_input[i] = -1; i++; } } int ft_key_release(int keycode, t_cub *clist) { keycode = ft_convert_keycode(keycode); ft_pop_key(keycode, clist); ft_printf("keys [%d][%d][%d][%d][%d]\n", clist->key_input[0], clist->key_input[1], clist->key_input[2], clist->key_input[3], clist->key_input[4]); return (0); }