diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-06 22:10:16 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-06 22:10:16 +0100 |
commit | 079a4b6e9389b05db2c672594cfb2f2b197e35dd (patch) | |
tree | f4a2bc882dd7667e2c9758e2be38e3484879e225 /src/ft_treat_args.c | |
parent | qwe (diff) | |
parent | okok (diff) | |
download | 42-cub3d-079a4b6e9389b05db2c672594cfb2f2b197e35dd.tar.gz 42-cub3d-079a4b6e9389b05db2c672594cfb2f2b197e35dd.tar.bz2 42-cub3d-079a4b6e9389b05db2c672594cfb2f2b197e35dd.tar.xz 42-cub3d-079a4b6e9389b05db2c672594cfb2f2b197e35dd.tar.zst 42-cub3d-079a4b6e9389b05db2c672594cfb2f2b197e35dd.zip |
Merge branch 'fork-music'
Diffstat (limited to 'src/ft_treat_args.c')
-rw-r--r-- | src/ft_treat_args.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ft_treat_args.c b/src/ft_treat_args.c index 2571709..a47f9f7 100644 --- a/src/ft_treat_args.c +++ b/src/ft_treat_args.c @@ -14,7 +14,6 @@ #include <cub3d.h> #include <stddef.h> #include <stdint.h> -#include <pthread.h> #include <unistd.h> uint8_t @@ -30,15 +29,20 @@ uint8_t } uint8_t - ft_use_args(int argc, const char *argv[], t_cub *clist) + ft_use_args(int argc, const char *argv[], char *const envp[], t_cub *clist) { + clist->envp = envp; if (argc < 3) { if (ft_init_winptr(clist) < 0) + { return (ft_exit(FT_RET_FAILED_MLX, clist)); + } ft_draw_scene(clist); if (clist->mlist.ismusic) - pthread_create(&clist->tid, NULL, ft_music_thread, clist); + { + ft_enable_music(clist); + } ft_hooks_and_loops(&clist->wlist, clist); } else if (argc == 3 && !ft_strncmp("--save", argv[2], 7)) |