XInitThreads() must be the very first Xlib function called or else

some X state will have initialized mutexes and some won't, leading
to unpredictable results depending on the feature set compiled into
wxWidgets and so on.

wxGTK starts by calling Xlib functions indirectly through gdk very
early on, so we must hook into wxApp::Initialize().

I believe this should properly fix issue 1540. In case of problems,
please reopen that issue. If you see XLockMutex in a backtrace,
that's a pretty good indication.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7205 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2011-02-19 21:53:53 +00:00
parent d93a548983
commit d2910912a4
3 changed files with 11 additions and 6 deletions

View File

@ -489,7 +489,7 @@ bool OpenGL_Create(int _iwidth, int _iheight)
if (GLWin.vi == NULL)
{
ERROR_LOG(VIDEO, "Could not choose visual (glXChooseVisual)");
exit(0);
return false;
}
}
}
@ -501,7 +501,7 @@ bool OpenGL_Create(int _iwidth, int _iheight)
if (!GLWin.ctx)
{
PanicAlert("Couldn't Create GLX context.Quit");
exit(0); // TODO: Don't bring down entire Emu
return false;
}
GLWin.x = _tx;