Browse code

emu: close audio device if used

Sigrid Solveig Haflínudóttir authored on 24/10/2021 20:14:27
Showing 1 changed files
... ...
@@ -231,7 +231,8 @@ redraw(Uxn *u)
231 231
 static void
232 232
 quit(void)
233 233
 {
234
-	SDL_UnlockAudioDevice(audio_id);
234
+	if(audio_id)
235
+		SDL_CloseAudioDevice(audio_id);
235 236
 	SDL_DestroyTexture(gTexture);
236 237
 	gTexture = NULL;
237 238
 	SDL_DestroyRenderer(gRenderer);