libft compile + NOW SUPPORTS 8K RESOLUTION 8D

This commit is contained in:
gbrochar 2024-10-05 11:29:47 +02:00
parent 9b08ecfca7
commit 9a83bb2975
2 changed files with 18 additions and 3 deletions

2
libft

@ -1 +1 @@
Subproject commit 1ab0cdf1acf97db0cb8d90940c96a6f1ccb3a7af
Subproject commit 88ac06645fbea2ba61d1df452c024ec7e6081c2f

View File

@ -47,8 +47,22 @@ void set_params(t_env *e, int argc, char **argv)
e->window.height = atoi(argv[4]);
if (argc >= 6)
e->camera.fov = atof(argv[5]);
e->window.width = e->window.width < 640 ? 640 : e->window.width;
e->window.height = e->window.height < 480 ? 480 : e->window.height;
if (e->window.width > 7680) {
ft_putstr("window width has been adjusted to 7680, the maximum supported\n");
e->window.width = 7680;
}
if (e->window.width < 240) {
ft_putstr("window width has been adjusted to 240, the minimum supported\n");
e->window.width = 240;
}
if (e->window.height > 7680) {
ft_putstr("window height has been adjusted to 7680, the maximum supported\n");
e->window.height = 7680;
}
if (e->window.height < 240) {
ft_putstr("window height has been adjusted to 240, the minimum supported\n");
e->window.height = 240;
}
e->camera.aspect = (double)e->window.width / (double)e->window.height;
}
@ -57,3 +71,4 @@ int parse(t_env *e, int argc, char **argv)
set_params(e, argc, argv);
return (parse_file(e));
}