aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_sfx_new_level.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-19 21:59:13 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-19 21:59:13 +0100
commitb135ba89ccceffa88356cc25f256b0cb2adbd88c (patch)
tree1e87c98d28857abfea2c5199dfdf77516ab28898 /src/ft_sfx_new_level.c
parentRework in progress (diff)
download42-cub3d-b135ba89ccceffa88356cc25f256b0cb2adbd88c.tar.gz
42-cub3d-b135ba89ccceffa88356cc25f256b0cb2adbd88c.tar.bz2
42-cub3d-b135ba89ccceffa88356cc25f256b0cb2adbd88c.tar.xz
42-cub3d-b135ba89ccceffa88356cc25f256b0cb2adbd88c.tar.zst
42-cub3d-b135ba89ccceffa88356cc25f256b0cb2adbd88c.zip
The og OOP
Diffstat (limited to 'src/ft_sfx_new_level.c')
-rw-r--r--src/ft_sfx_new_level.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ft_sfx_new_level.c b/src/ft_sfx_new_level.c
index 7e5d4ea..6dfe564 100644
--- a/src/ft_sfx_new_level.c
+++ b/src/ft_sfx_new_level.c
@@ -24,11 +24,11 @@ void
else
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
sfx = (t_sfx *)vargp;
- pthread_mutex_lock(&sfx->new_lvl_mutex);
+ pthread_mutex_lock(&sfx[2].mutex);
while (1)
{
- pthread_mutex_lock(&sfx->new_lvl_mutex);
- if (system(sfx->new_lvl))
+ pthread_mutex_lock(&sfx[2].mutex);
+ if (system(sfx[2].cmd))
pthread_exit(NULL);
}
return (NULL);
@@ -37,5 +37,5 @@ void
void
ft_sfx_new_level(t_sfx *sfx)
{
- pthread_mutex_unlock(&cl->sfx.new_lvl_mutex);
+ pthread_mutex_unlock(&sfx[2].mutex);
}