diff --git a/pcsx2/gui/AppInit.cpp b/pcsx2/gui/AppInit.cpp index 3e0796be2f..a7348493f7 100644 --- a/pcsx2/gui/AppInit.cpp +++ b/pcsx2/gui/AppInit.cpp @@ -43,6 +43,10 @@ #endif #endif // __WXGTK__ +#ifdef SDL_BUILD +#include +#endif + using namespace pxSizerFlags; void Pcsx2App::DetectCpuAndUserMode() @@ -505,6 +509,12 @@ bool Pcsx2App::OnInit() CleanupOnExit(); return false; } + +#ifdef SDL_BUILD + // MacOS Game Controller framework requires a few runs of the main event loop after interest in game controllers is first indicated to connect controllers + // Since OnePad doesn't currently handle connection/disconnection events and requires controllers to be connected on start, we need to initialize SDL before OnePad looks at the controller list + SDL_Init(SDL_INIT_GAMECONTROLLER); +#endif return true; }