From 43ea2532e85ab1e2ffe2b2c41413bb000cf7080e Mon Sep 17 00:00:00 2001 From: Andrew Alderwick Date: Tue, 3 Aug 2021 23:02:57 +0100 Subject: [PATCH] Made audio open errors into warnings Varvara will continue to execute if SDL_OpenAudioDevice fails, but the Audio devices will be disabled. --- src/uxnemu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/uxnemu.c b/src/uxnemu.c index 2db48c0..6eb41d4 100644 --- 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);