From b36a5a95f087d7212e376c9c4c28a43b6fef5376 Mon Sep 17 00:00:00 2001 From: Ben Anderson Date: Sat, 29 Mar 2014 00:33:51 +1300 Subject: [PATCH] x11 fix --- rpcs3/rpcs3.cpp | 10 ++++++++++ rpcs3/rpcs3.h | 2 ++ 2 files changed, 12 insertions(+) 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); };