From 030fe8c3316d1e1f5f3dea81c3fffd8e00c16afa Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Sat, 15 Feb 2020 20:29:21 +0100 Subject: Work in progress, res now --- src/ft_get_screen_size.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ft_get_screen_size.c') diff --git a/src/ft_get_screen_size.c b/src/ft_get_screen_size.c index fe368c4..2b437c3 100644 --- a/src/ft_get_screen_size.c +++ b/src/ft_get_screen_size.c @@ -24,5 +24,9 @@ int8_t return (-1); wlist->x_max_size = ft_atoi(words[0]); wlist->y_max_size = ft_atoi(words[1]); + if (wlist->x_size > wlist->x_max_size) + wlist->x_size = wlist->x_max_size; + if (wlist->y_size > wlist->y_max_size) + wlist->y_size = wlist->y_max_size; return (ft_free_words(words)); } -- cgit v1.2.3