aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_get_screen_size.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-15 20:29:21 +0100
committerRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-15 20:29:21 +0100
commit030fe8c3316d1e1f5f3dea81c3fffd8e00c16afa (patch)
treeaa661716c5ffdd844e41bccb9be833637eaaa3b8 /src/ft_get_screen_size.c
parentIn progress (diff)
download42-cub3d-030fe8c3316d1e1f5f3dea81c3fffd8e00c16afa.tar.gz
42-cub3d-030fe8c3316d1e1f5f3dea81c3fffd8e00c16afa.tar.bz2
42-cub3d-030fe8c3316d1e1f5f3dea81c3fffd8e00c16afa.tar.xz
42-cub3d-030fe8c3316d1e1f5f3dea81c3fffd8e00c16afa.tar.zst
42-cub3d-030fe8c3316d1e1f5f3dea81c3fffd8e00c16afa.zip
Work in progress, res now
Diffstat (limited to 'src/ft_get_screen_size.c')
-rw-r--r--src/ft_get_screen_size.c4
1 files changed, 4 insertions, 0 deletions
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));
}