From 76cb52407b50faa33fd3e8a4234c7e83879f03be Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 6 Jul 2020 02:47:05 +1000 Subject: [PATCH] SDLControllerInterface: Init joystick API as well --- src/frontend-common/sdl_controller_interface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend-common/sdl_controller_interface.cpp b/src/frontend-common/sdl_controller_interface.cpp index fab613b22..7b2c93b0e 100644 --- a/src/frontend-common/sdl_controller_interface.cpp +++ b/src/frontend-common/sdl_controller_interface.cpp @@ -23,9 +23,9 @@ bool SDLControllerInterface::Initialize(CommonHostInterface* host_interface) FrontendCommon::EnsureSDLInitialized(); - if (SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC) < 0) + if (SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC) < 0) { - Log_ErrorPrintf("SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC) failed"); + Log_ErrorPrintf("SDL_InitSubSystem(SDL_INIT_JOYSTICK |SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC) failed"); return false; } @@ -41,7 +41,7 @@ void SDLControllerInterface::Shutdown() if (m_sdl_subsystem_initialized) { - SDL_QuitSubSystem(SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC); + SDL_QuitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC); m_sdl_subsystem_initialized = false; }