aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-24 17:00:14 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-24 17:00:14 +0200
commit2e69f9b0e278c374da4a1f54df1576132a3d521c (patch)
treee50d87f6c660b0aa3ecc429dbb3d4bb91615ac1e /src
parentWith that (diff)
download42-cub3d-2e69f9b0e278c374da4a1f54df1576132a3d521c.tar.gz
42-cub3d-2e69f9b0e278c374da4a1f54df1576132a3d521c.tar.bz2
42-cub3d-2e69f9b0e278c374da4a1f54df1576132a3d521c.tar.xz
42-cub3d-2e69f9b0e278c374da4a1f54df1576132a3d521c.tar.zst
42-cub3d-2e69f9b0e278c374da4a1f54df1576132a3d521c.zip
Retry
Diffstat (limited to 'src')
-rw-r--r--src/ft_exit.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c
index 0fcc9dc..988a0cf 100644
--- a/src/ft_exit.c
+++ b/src/ft_exit.c
@@ -46,13 +46,23 @@ static void
if (clist->isoldmus && clist->wlist.inited)
{
- system(FT_SND_TERM_CMD);
+ if (FT_OS == 2)
+ {
+ pthread_cancel(clist->sfx[i].tid);
+ }
+ else
+ system(FT_SND_TERM_CMD);
}
i = -1;
while (++i < FT_TOTAL_SFX)
{
- pthread_mutex_unlock(&clist->sfx[i].mutex);
- system(FT_SND_TERM_CMD);
+ pthread_mutex_destroy(&clist->sfx[i].mutex);
+ if (FT_OS == 2)
+ {
+ pthread_cancel(clist->sfx[i].tid);
+ }
+ else
+ system(FT_SND_TERM_CMD);
}
}