diff options
author | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-01-23 17:36:01 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-01-23 17:36:01 +0100 |
commit | 3a6bed0d03a3e73a6ad2704d1f858174520863c6 (patch) | |
tree | d74b4aa36febc25612d8d56eae100dd7a9d1f59f /src/ft_key_events.c | |
parent | nice (diff) | |
download | 42-cub3d-3a6bed0d03a3e73a6ad2704d1f858174520863c6.tar.gz 42-cub3d-3a6bed0d03a3e73a6ad2704d1f858174520863c6.tar.bz2 42-cub3d-3a6bed0d03a3e73a6ad2704d1f858174520863c6.tar.xz 42-cub3d-3a6bed0d03a3e73a6ad2704d1f858174520863c6.tar.zst 42-cub3d-3a6bed0d03a3e73a6ad2704d1f858174520863c6.zip |
window now closes
Diffstat (limited to '')
-rw-r--r-- | src/ft_key_events.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ft_key_events.c b/src/ft_key_events.c new file mode 100644 index 0000000..f333cd0 --- /dev/null +++ b/src/ft_key_events.c @@ -0,0 +1,18 @@ +#include <libft.h> +#include <cub3d.h> +#include <stdlib.h> + +int +ft_key_event(int keycode, void *param) +{ + (void)param; + ft_printf("Key [%d] pressed\n", keycode); + if (keycode == 53) + { + /* ft_memdel(param->wlx); */ + /* ft_memdel(param->winptr); */ + /* ft_memdel(param); */ + exit(0); + } + return (0); +} |