aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-03 19:52:19 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-03 19:52:19 +0100
commit202ff3128712ce9f11fe95a171e23ec701f53820 (patch)
tree6ecf8245304b1d2ab22da83e22c387af74c8a0b4
parentBetter music command handling (diff)
download42-cub3d-202ff3128712ce9f11fe95a171e23ec701f53820.tar.gz
42-cub3d-202ff3128712ce9f11fe95a171e23ec701f53820.tar.bz2
42-cub3d-202ff3128712ce9f11fe95a171e23ec701f53820.tar.xz
42-cub3d-202ff3128712ce9f11fe95a171e23ec701f53820.tar.zst
42-cub3d-202ff3128712ce9f11fe95a171e23ec701f53820.zip
Now better handling
-rw-r--r--inc/cub3d_defines.h4
-rw-r--r--src/ft_get_music.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h
index c84f6c1..0515fcd 100644
--- a/inc/cub3d_defines.h
+++ b/inc/cub3d_defines.h
@@ -80,9 +80,9 @@ enum
** ====== MUSIC CMD ======
*/
# if FT_OS == 1
-# define FT_MUS_CMD "aplay -f cd -t wav -q %s"
-# else
# define FT_MUS_CMD ""
+# else
+# define FT_MUS_CMD "aplay -f cd -t wav -q %s"
# endif
/*
diff --git a/src/ft_get_music.c b/src/ft_get_music.c
index 280a6c2..fe39361 100644
--- a/src/ft_get_music.c
+++ b/src/ft_get_music.c
@@ -21,8 +21,8 @@ static void
uint8_t len;
len = ft_strlen(mlist->music_path);
- len += ft_strlen(FT_MUS_CMD);
- ft_memdel((void**)&mlist->music_cmd) - 2;
+ len += ft_strlen(FT_MUS_CMD) - 2;
+ ft_memdel((void**)&mlist->music_cmd);
if (!(mlist->music_cmd = (char *)malloc((len + 1) * sizeof(char))))
return ;
ft_sprintf(mlist->music_cmd, FT_MUS_CMD,