aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_treat_args.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_treat_args.c')
-rw-r--r--src/ft_treat_args.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ft_treat_args.c b/src/ft_treat_args.c
index fe794d8..92464ab 100644
--- a/src/ft_treat_args.c
+++ b/src/ft_treat_args.c
@@ -37,10 +37,13 @@ uint8_t
{
if (ft_init_winptr(clist) < 0)
return (ft_exit(FT_RET_FAILED_MLX, clist));
- clist->img.img = mlx_new_image(clist->wlist.wlx,
+ if (FT_OS == 1)
+ {
+ clist->img.img = mlx_new_image(clist->wlist.wlx,
clist->wlist.x_size, clist->wlist.y_size);
- clist->img.ptr = mlx_get_data_addr(clist->img.img, &clist->img.bpp,
+ clist->img.ptr = mlx_get_data_addr(clist->img.img, &clist->img.bpp,
&clist->img.sizeline, &clist->img.endian);
+ }
ft_draw_scene(clist);
if (clist->mlist.ismusic)
ft_enable_music(clist);
@@ -52,9 +55,6 @@ uint8_t
return (ft_exit(FT_RET_FINE, clist));
}
else
- {
- ft_dprintf(STDERR_FILENO, "Error\n\033[1;31mBad arguments\n\033[0m");
- return (ft_exit(FT_RET_BAD_ARGV, clist));
- }
+ return (ft_error(FT_RET_BAD_ARGV, FT_ERR_ARGV, clist))
return (FT_RET_FINE);
}