Skip to content
Snippets Groups Projects
Commit 7cc7064d authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Ensure XInitThreads is called before SDL initialization so threaded nvidia optimization works

parent 360132a5
No related branches found
No related tags found
No related merge requests found
...@@ -239,9 +239,12 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks, ...@@ -239,9 +239,12 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
mGamma(1.0f) mGamma(1.0f)
{ {
SDL_SetMainReady(); SDL_SetMainReady();
SDL_LogSetOutputFunction(&sdlLogOutputFunc, nullptr); SDL_LogSetOutputFunction(&sdlLogOutputFunc, nullptr);
#if LL_X11
XInitThreads();
#endif
if (SDL_InitSubSystem(SDL_INIT_EVENTS|SDL_INIT_VIDEO|SDL_INIT_GAMECONTROLLER|SDL_INIT_JOYSTICK) != 0) if (SDL_InitSubSystem(SDL_INIT_EVENTS|SDL_INIT_VIDEO|SDL_INIT_GAMECONTROLLER|SDL_INIT_JOYSTICK) != 0)
{ {
LL_WARNS() << "Failed to initialize SDL due to error: " << SDL_GetError() << LL_ENDL; LL_WARNS() << "Failed to initialize SDL due to error: " << SDL_GetError() << LL_ENDL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment