diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ft_get_tex.c | 0 | ||||
-rw-r--r-- | src/ft_key_events.c | 15 | ||||
-rw-r--r-- | src/ft_parse_map.c | 2 |
3 files changed, 10 insertions, 7 deletions
diff --git a/src/ft_get_tex.c b/src/ft_get_tex.c new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/ft_get_tex.c diff --git a/src/ft_key_events.c b/src/ft_key_events.c index 088df54..74d6346 100644 --- a/src/ft_key_events.c +++ b/src/ft_key_events.c @@ -35,14 +35,17 @@ ft_key_event(int keycode, void *param) { int (*fun_ptr[4])(void); - fun_ptr[0] = ft_a_key; - fun_ptr[1] = ft_s_key; - fun_ptr[2] = ft_d_key; - fun_ptr[3] = ft_w_key; + fun_ptr[0] = ft_w_key; + fun_ptr[1] = ft_a_key; + fun_ptr[2] = ft_s_key; + fun_ptr[3] = ft_d_key; ft_printf("Key [%d] pressed\n", keycode); - (keycode == 13) ? (keycode = 3) : 0; + (keycode == FT_W_KEY) ? (keycode = 0) : 0; + (keycode == FT_A_KEY) ? (keycode = 1) : 0; + (keycode == FT_S_KEY) ? (keycode = 2) : 0; + (keycode == FT_D_KEY) ? (keycode = 3) : 0; (keycode <= 3) ? ((*fun_ptr[keycode])()) : 0; - if (keycode == 53) + if (keycode == FT_ESC_KEY) { ft_memdel(((t_win*)param)->winptr); ft_memdel(((t_win*)param)->wlx); diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c index 2fa5741..60726a2 100644 --- a/src/ft_parse_map.c +++ b/src/ft_parse_map.c @@ -5,7 +5,7 @@ #include <unistd.h> /* -** I can't close +** I can't close fd */ void |