diff --git a/rpcs3/rpcs3.cpp b/rpcs3/rpcs3.cpp index 5d0c941318..b58fd00f5e 100644 --- a/rpcs3/rpcs3.cpp +++ b/rpcs3/rpcs3.cpp @@ -7,6 +7,10 @@ #include #endif +#ifdef __UNIX__ +#include +#endif + const wxEventType wxEVT_DBG_COMMAND = wxNewEventType(); IMPLEMENT_APP(Rpcs3App) @@ -66,6 +70,12 @@ void Rpcs3App::SendDbgCommand(DbgCommand id, CPUThread* thr) AddPendingEvent(event); } +Rpcs3App::Rpcs3App() +{ + #ifdef __UNIX__ + XInitThreads(); + #endif +} /* CPUThread& GetCPU(const u8 core) { diff --git a/rpcs3/rpcs3.h b/rpcs3/rpcs3.h index 3a247b5bec..d68d3d03d5 100644 --- a/rpcs3/rpcs3.h +++ b/rpcs3/rpcs3.h @@ -58,6 +58,8 @@ public: virtual void OnArguments(); // Handle arguments: Rpcs3App::argc, Rpcs3App::argv virtual void Exit(); + Rpcs3App(); + void SendDbgCommand(DbgCommand id, CPUThread* thr=nullptr); };