mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-04 00:36:36 +00:00
Don't switch between GLX and EGL if EGL worked
This commit is contained in:
parent
563b760d31
commit
17848c097c
@ -732,6 +732,15 @@ bool EGLRenderer::initialize(PDECODER_PARAMETERS params)
|
|||||||
// Detach the context from this thread, so the render thread can attach it
|
// Detach the context from this thread, so the render thread can attach it
|
||||||
SDL_GL_MakeCurrent(m_Window, nullptr);
|
SDL_GL_MakeCurrent(m_Window, nullptr);
|
||||||
|
|
||||||
|
#ifdef SDL_HINT_VIDEO_X11_FORCE_EGL
|
||||||
|
if (err == GL_NO_ERROR) {
|
||||||
|
// If we got a working GL implementation via EGL, avoid using GLX from now on.
|
||||||
|
// GLX will cause problems if we later want to use EGL again on this window.
|
||||||
|
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "EGL passed preflight checks. Using EGL for GL context creation.");
|
||||||
|
SDL_SetHint(SDL_HINT_VIDEO_X11_FORCE_EGL, "1");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return err == GL_NO_ERROR;
|
return err == GL_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user