diff --git a/Source/Core/DolphinWX/Src/MainNoGUI.cpp b/Source/Core/DolphinWX/Src/MainNoGUI.cpp index 31d4e03836..3d7256931f 100644 --- a/Source/Core/DolphinWX/Src/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/Src/MainNoGUI.cpp @@ -32,6 +32,10 @@ #include #endif +#if defined HAVE_X11 && HAVE_X11 +#include +#endif + #if defined(HAVE_COCOA) && HAVE_COCOA #import "cocoaApp.h" #endif @@ -228,6 +232,10 @@ int main(int argc, char* argv[]) CPluginManager::GetInstance().ScanForPlugins(); +#if defined HAVE_X11 && HAVE_X11 + XInitThreads(); +#endif + if (BootManager::BootCore(bootFile)) //no use running the loop when booting fails { while (PowerPC::GetState() != PowerPC::CPU_POWERDOWN) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp index f75d68876f..73a353ce79 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp @@ -189,6 +189,18 @@ void CreateXWindow (void) #if defined(HAVE_GTK2) && HAVE_GTK2 && defined(wxGTK) wxMutexGuiLeave(); #endif + + if (g_Config.bHideCursor) + { + // make a blank cursor + Pixmap Blank; + XColor DummyColor; + char ZeroData[1] = {0}; + Blank = XCreateBitmapFromData (GLWin.dpy, GLWin.win, ZeroData, 1, 1); + GLWin.blankCursor = XCreatePixmapCursor(GLWin.dpy, Blank, Blank, &DummyColor, &DummyColor, 0, 0); + XFreePixmap (GLWin.dpy, Blank); + } + GLWin.xEventThread = new Common::Thread(XEventThread, NULL); } @@ -659,16 +671,6 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight CreateXWindow(); g_VideoInitialize.pXWindow = (Window *) &GLWin.win; - if (g_Config.bHideCursor) - { - // make a blank cursor - Pixmap Blank; - XColor DummyColor; - char ZeroData[1] = {0}; - Blank = XCreateBitmapFromData (GLWin.dpy, GLWin.win, ZeroData, 1, 1); - GLWin.blankCursor = XCreatePixmapCursor(GLWin.dpy, Blank, Blank, &DummyColor, &DummyColor, 0, 0); - XFreePixmap (GLWin.dpy, Blank); - } #endif return true; }