From 6764264488488a97ddb60be07f59c0750cc173a7 Mon Sep 17 00:00:00 2001 From: Ian Chamberlain Date: Thu, 28 Jul 2022 11:21:53 -0400 Subject: [PATCH] Initialize GAMECONTROLLER in EmuWindow_SDL2 (#6078) Resolves #6077 If only `SDL_INIT_JOYSTICK` is used, `InputCommon::SDL::SDLState` later tries to initialize the game controller in a background thread, which on macOS causes a crash in `SDL_PumpEvents`. From [the SDL docs](https://wiki.libsdl.org/SDL_Init), `SDL_INIT_GAMECONTROLLER` implies `SDL_INIT_JOYSTICK`, so this should be a total superset of the previous behavior. --- src/citra/emu_window/emu_window_sdl2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/citra/emu_window/emu_window_sdl2.cpp b/src/citra/emu_window/emu_window_sdl2.cpp index f3d4c5d04..98045c3c6 100644 --- a/src/citra/emu_window/emu_window_sdl2.cpp +++ b/src/citra/emu_window/emu_window_sdl2.cpp @@ -134,7 +134,7 @@ void EmuWindow_SDL2::Fullscreen() { EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) { // Initialize the window - if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) { + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER) < 0) { LOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting..."); exit(1); }