From 114df1314a69161e5802ce6192aa8f1599867f3e Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Wed, 11 Mar 2020 15:30:51 +0100 Subject: qweqwe --- src/ft_treat_args.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/ft_treat_args.c') diff --git a/src/ft_treat_args.c b/src/ft_treat_args.c index a47f9f7..fe794d8 100644 --- a/src/ft_treat_args.c +++ b/src/ft_treat_args.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -35,14 +36,14 @@ uint8_t if (argc < 3) { if (ft_init_winptr(clist) < 0) - { return (ft_exit(FT_RET_FAILED_MLX, clist)); - } + 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.sizeline, &clist->img.endian); ft_draw_scene(clist); if (clist->mlist.ismusic) - { ft_enable_music(clist); - } ft_hooks_and_loops(&clist->wlist, clist); } else if (argc == 3 && !ft_strncmp("--save", argv[2], 7)) -- cgit v1.2.3