diff options
author | kdx <kikoodx@paranoici.org> | 2023-04-30 16:37:46 +0200 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2023-04-30 16:37:46 +0200 |
commit | a4112e4311eb226c4f43cb697aa7f6c34bd7b9a5 (patch) | |
tree | fca5829693c41fac4bf2e70cd4c63f1d1742d51a /sources/TZR_StopMusic.c | |
parent | 6044a3bac4433e9ce8d114bdbc180ca7b48b2344 (diff) | |
download | tzr-a4112e4311eb226c4f43cb697aa7f6c34bd7b9a5.tar.gz |
music playing
Diffstat (limited to 'sources/TZR_StopMusic.c')
-rw-r--r-- | sources/TZR_StopMusic.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sources/TZR_StopMusic.c b/sources/TZR_StopMusic.c new file mode 100644 index 0000000..94eda2f --- /dev/null +++ b/sources/TZR_StopMusic.c @@ -0,0 +1,14 @@ +#include "TZR_sound.h" +#include "TZR_globals.h" + +void +TZR_StopMusic(void) +{ + if (!___tzr_config.mixer) + return; + if (Mix_PlayingMusic()) + Mix_HaltMusic(); + if (___tzr_music != NULL) + Mix_FreeMusic(___tzr_music); + ___tzr_music = NULL; +} |