From 72a26cb0c9f6338fdc253ff9da6242cab05da9f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Wed, 29 Dec 2021 23:01:11 +0100 Subject: [PATCH] once again... --- src/uxnemu.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/uxnemu.c b/src/uxnemu.c index 75201c9..5b062ba 100644 --- a/src/uxnemu.c +++ b/src/uxnemu.c @@ -155,15 +155,8 @@ init(void) as.callback = audio_callback; as.samples = 512; as.userdata = NULL; - if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) < 0) { - error("sdl", SDL_GetError()); - if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) - return error("sdl", SDL_GetError()); - } else { - audio_id = SDL_OpenAudioDevice(NULL, 0, &as, NULL, 0); - if(!audio_id) - error("sdl_audio", SDL_GetError()); - } + if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) < 0) + return error("sdl", SDL_GetError()); #ifdef __ANDROID__ winflags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_BORDERLESS | SDL_WINDOW_INPUT_GRABBED; #else @@ -186,7 +179,6 @@ init(void) SDL_StartTextInput(); SDL_ShowCursor(SDL_DISABLE); SDL_EventState(SDL_DROPFILE, SDL_ENABLE); - SDL_GameControllerEventState(SDL_ENABLE); return 1; }