From 05ad2085ab6ce4ffb280b21ce3f321b2bd75aa9e Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 17 Mar 2020 17:15:32 +0100 Subject: fps counter is bav --- src/ft_sfx_footstep.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/ft_sfx_footstep.c') diff --git a/src/ft_sfx_footstep.c b/src/ft_sfx_footstep.c index a2eef1d..c0c9ffe 100644 --- a/src/ft_sfx_footstep.c +++ b/src/ft_sfx_footstep.c @@ -31,9 +31,12 @@ void ref = (ref > 201) ? (0) : (ref + 1); pthread_mutex_lock(&sfx->footstep_mutex); if (ref % 2) - system(sfx->footstep_one); - else - system(sfx->footstep_two); + { + if (system(sfx->footstep_one)) + pthread_exit(NULL); + } + else if (system(sfx->footstep_two)) + pthread_exit(NULL); } return (NULL); } -- cgit v1.2.3