aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_get_res.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_get_res.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ft_get_res.c b/src/ft_get_res.c
index dece00f..26853be 100644
--- a/src/ft_get_res.c
+++ b/src/ft_get_res.c
@@ -31,6 +31,15 @@ static int8_t
return (0);
}
+static void
+ ft_securize_scr(t_win *wl)
+{
+ while (wl->x_size % 10)
+ wl->x_size -= 1;
+ while (wl->y_size % 10)
+ wl->y_size -= 1;
+}
+
int8_t
ft_get_res(char **words, t_cub *clist)
{
@@ -57,5 +66,6 @@ int8_t
}
if (ft_get_screen_size(wlist) < 0)
return (-1);
+ ft_securize_scr(wlist);
return (0);
}