diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-13 00:25:57 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-13 00:25:57 +0100 |
commit | 24c048797025d31a23413c69a2e9ed5009e79eaf (patch) | |
tree | 6edfa5f053ba16e62cd65c671bb7e84fd9ab04f9 /src/ft_treat_args.c | |
parent | Ok nice (diff) | |
download | 42-cub3d-24c048797025d31a23413c69a2e9ed5009e79eaf.tar.gz 42-cub3d-24c048797025d31a23413c69a2e9ed5009e79eaf.tar.bz2 42-cub3d-24c048797025d31a23413c69a2e9ed5009e79eaf.tar.xz 42-cub3d-24c048797025d31a23413c69a2e9ed5009e79eaf.tar.zst 42-cub3d-24c048797025d31a23413c69a2e9ed5009e79eaf.zip |
Better linux compat
Diffstat (limited to 'src/ft_treat_args.c')
-rw-r--r-- | src/ft_treat_args.c | 12 |
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); } |