This commit is contained in:
mcolonna 2024-10-17 16:10:54 +02:00
parent 39158f4890
commit fa7e448c70
2 changed files with 5 additions and 6 deletions

View file

@ -6,7 +6,7 @@
/* By: mcolonna <mcolonna@student.42.fr> +#+ +:+ +#+ */ /* By: mcolonna <mcolonna@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/17 14:43:36 by mcolonna #+# #+# */ /* Created: 2024/10/17 14:43:36 by mcolonna #+# #+# */
/* Updated: 2024/10/17 15:00:54 by mcolonna ### ########.fr */ /* Updated: 2024/10/17 16:05:50 by mcolonna ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -30,13 +30,13 @@ static void set_action(int keycode, bool value)
g_input_actions.quit = value; g_input_actions.quit = value;
} }
int keypress(int keycode) int keypress(int keycode)
{ {
set_action(keycode, true); set_action(keycode, true);
return (0); return (0);
} }
int keyrelease(int keycode) int keyrelease(int keycode)
{ {
set_action(keycode, false); set_action(keycode, false);
return (0); return (0);

View file

@ -6,7 +6,7 @@
/* By: mcolonna <mcolonna@student.42.fr> +#+ +:+ +#+ */ /* By: mcolonna <mcolonna@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/03 15:02:09 by mc #+# #+# */ /* Created: 2024/10/03 15:02:09 by mc #+# #+# */
/* Updated: 2024/10/17 15:59:15 by mcolonna ### ########.fr */ /* Updated: 2024/10/17 16:09:31 by mcolonna ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -36,8 +36,7 @@ bool read_color_parameter(const char *name, t_color *dest,
if (!err && *dest != 0xFF000000) if (!err && *dest != 0xFF000000)
{ {
*redefined = true; *redefined = true;
write_err("Parameter '", name, "' was defined several times\n", write_err("Parameter '", name, "' was defined several times\n", NULL);
NULL);
} }
else if (!err) else if (!err)
*dest = color_from_rgb(rgb[0], rgb[1], rgb[2]); *dest = color_from_rgb(rgb[0], rgb[1], rgb[2]);