SDL: Call XInitThreads() after loading Xlib
XInitThreads() enables thread-safety in Xlib, so multiple threads can
safely call into it concurrently. This happens with GLES passthrough
enabled: the GLES system serializes its own Xlib and GLX calls, but
there is no serialization between the GLES system and the SDL code
running the main UI.
This call must be the first Xlib call, so I put it here in the loading
code rather than the multiple places that call XOpenDisplay().
Change-Id: I3cd3177fb8e0904a803a6b5c8f89a4ecda73bd1c
2 files changed