X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fsound.c;h=de334340c50f820be2065c5339790bd586cae71e;hb=e5c2eddc151a59db4e611a77901732d7c15fde90;hp=ab925241120c2e8c22b05234ae1d90ede8edff79;hpb=a2115940e7643dcb1b87286f3d19fe95f7b79bd3;p=flatwaifu.git diff --git a/src/sound.c b/src/sound.c index ab92524..de33434 100644 --- a/src/sound.c +++ b/src/sound.c @@ -21,8 +21,8 @@ */ #include "glob.h" -#include "files.h" #include "sound.h" +#include "error.h" #include #include @@ -74,8 +74,10 @@ void S_init(void) void S_done(void) { free_chunks(); - Mix_CloseAudio(); - SDL_QuitSubSystem(SDL_INIT_AUDIO); + if (SDL_WasInit(SDL_INIT_AUDIO)) { + Mix_CloseAudio(); + SDL_QuitSubSystem(SDL_INIT_AUDIO); + } } Mix_Chunk * get_chunk(snd_t *s, int r, int v)