diff --git a/pcsx2/gui/AppInit.cpp b/pcsx2/gui/AppInit.cpp index ca8ab64e2b..e3a7e72800 100644 --- a/pcsx2/gui/AppInit.cpp +++ b/pcsx2/gui/AppInit.cpp @@ -36,6 +36,13 @@ #include #include +#ifdef __WXGTK__ +#include +#ifdef GDK_WINDOWING_X11 +#include +#endif +#endif // __WXGTK__ + using namespace pxSizerFlags; void Pcsx2App::DetectCpuAndUserMode() @@ -707,6 +714,11 @@ Pcsx2App::Pcsx2App() } #endif +#ifdef GDK_WINDOWING_X11 + // This *must* be done in the constructor, before wx starts making X calls. + XInitThreads(); +#endif + m_PendingSaves = 0; m_ScheduledTermination = false; m_UseGUI = true;