-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_controls.c
27 lines (23 loc) · 1.11 KB
/
setup_controls.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* setup_controls.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dvan-der <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/12/15 08:24:01 by dvan-der #+# #+# */
/* Updated: 2022/02/04 16:25:07 by dvan-der ### ########.fr */
/* */
/* ************************************************************************** */
#include "fdf.h"
static int ft_close(void *param);
void setup_controls(t_fdf *fdf)
{
mlx_hook(fdf->win_ptr, 2, 0, key_press, fdf);
mlx_hook(fdf->win_ptr, 17, 0, ft_close, fdf);
}
static int ft_close(void *param)
{
(void)param;
exit (0);
}