commit 43ea2532e85ab1e2ffe2b2c41413bb000cf7080e
parent b6c40129e4403651537e5590b105cb3da4117140
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date:   Tue,  3 Aug 2021 23:02:57 +0100
Made audio open errors into warnings
Varvara will continue to execute if SDL_OpenAudioDevice fails, but the
Audio devices will be disabled.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/uxnemu.c b/src/uxnemu.c
@@ -205,7 +205,7 @@ init(void)
 	as.userdata = NULL;
 	audio_id = SDL_OpenAudioDevice(NULL, 0, &as, NULL, 0);
 	if(!audio_id)
-		return error("sdl_audio", SDL_GetError());
+		error("sdl_audio", SDL_GetError());
 	return 1;
 }
 
@@ -353,6 +353,7 @@ static void
 audio_talk(Device *d, Uint8 b0, Uint8 w)
 {
 	Apu *c = &apu[d - devaudio0];
+	if(!audio_id) return;
 	if(!w) {
 		if(b0 == 0x2)
 			mempoke16(d->dat, 0x2, c->i);