mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-15 13:52:28 +00:00
Tiny EGL code cleanup
This commit is contained in:
parent
0e5670d50d
commit
d8dbe77427
1 changed files with 3 additions and 1 deletions
|
@ -859,7 +859,9 @@ void EGLRenderer::waitToRender()
|
|||
// See comment in renderFrame() for more details.
|
||||
SDL_GL_MakeCurrent(m_Window, m_Context);
|
||||
|
||||
if (m_LastRenderSync != 0) {
|
||||
// Wait for the previous buffer swap to finish before picking the next frame to render.
|
||||
// This way we'll get the latest available frame and render it without blocking.
|
||||
if (m_LastRenderSync != EGL_NO_SYNC) {
|
||||
SDL_assert(m_eglClientWaitSync != nullptr);
|
||||
m_eglClientWaitSync(m_EGLDisplay, m_LastRenderSync, EGL_SYNC_FLUSH_COMMANDS_BIT, EGL_FOREVER);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue