From f22e02bfc1381e3bff66f6c1e9e6e85087a70c9b Mon Sep 17 00:00:00 2001 From: mcolonna Date: Thu, 7 Nov 2024 18:39:42 +0100 Subject: [PATCH] fix leak by removing mlx_mouse_hide() :( --- src/input.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/input.c b/src/input.c index 3695cac..ac940fe 100644 --- a/src/input.c +++ b/src/input.c @@ -6,7 +6,7 @@ /* By: mc +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/10/17 14:43:36 by mcolonna #+# #+# */ -/* Updated: 2024/11/07 18:03:00 by mc ### ########.fr */ +/* Updated: 2024/11/07 18:37:52 by mc ### ########.fr */ /* */ /* ************************************************************************** */ @@ -64,12 +64,13 @@ static int hook_mousemove(int x, int y) return (0); } +// TODO hide cursor without leak? void input_init(void *mlx_ptr, void *win_ptr) { + (void)mlx_ptr; ft_memset(&g_input_actions, 0, sizeof(g_input_actions)); mlx_hook(win_ptr, DestroyNotify, StructureNotifyMask, set_quit, NULL); mlx_hook(win_ptr, KeyPress, KeyPressMask, hook_keypress, NULL); mlx_hook(win_ptr, KeyRelease, KeyReleaseMask, hook_keyrelease, NULL); mlx_hook(win_ptr, MotionNotify, PointerMotionMask, hook_mousemove, NULL); - mlx_mouse_hide(mlx_ptr, win_ptr); }