Fixed: Crash under Linux saying you can't use X in multi-threaded environment

This commit is contained in:
kervala 2015-11-22 18:37:29 +01:00
parent 4d132da8ca
commit e3919f268b

View file

@ -350,6 +350,12 @@ bool CDriverGL::init (uintptr_t windowIcon, emptyProc exitFunc)
nlunreferenced(windowIcon); nlunreferenced(windowIcon);
// allow several threads to access X functions
if (XInitThreads() == 0)
{
nlwarning("XInitThreads failed");
}
_dpy = XOpenDisplay(NULL); _dpy = XOpenDisplay(NULL);
if (_dpy == NULL) if (_dpy == NULL)