mirror of https://github.com/PCSX2/pcsx2.git
Pad: Fix connection of macOS GameController framework controllers
This commit is contained in:
parent
a12ad1f627
commit
1beb5517a7
|
@ -43,6 +43,10 @@
|
|||
#endif
|
||||
#endif // __WXGTK__
|
||||
|
||||
#ifdef SDL_BUILD
|
||||
#include <SDL.h>
|
||||
#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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue