From 97474488d8a8025b440bc83c56e7861f225f6b5b Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 16 Oct 2021 11:56:20 +1000 Subject: [PATCH] wx: Call XInitThreads on startup --- pcsx2/gui/AppInit.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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;