OpenGLHostDisplay: Update sync interval on MakeCurrent()

This commit is contained in:
Connor McLaughlin
2022-12-08 13:17:20 +10:00
parent 9d23df3aba
commit dfdbc9a8ce
10 changed files with 29 additions and 2 deletions

View File

@ -328,7 +328,6 @@ bool OpenGLHostDisplay::SetupDevice()
if (!CreateResources())
return false;
SetSwapInterval();
return true;
}
@ -340,6 +339,7 @@ bool OpenGLHostDisplay::MakeCurrent()
return false;
}
SetSwapInterval();
return true;
}
@ -361,7 +361,9 @@ bool OpenGLHostDisplay::ChangeWindow(const WindowInfo& new_wi)
m_window_info = m_gl_context->GetWindowInfo();
// Update swap interval for new surface.
SetSwapInterval();
if (m_gl_context->IsCurrent())
SetSwapInterval();
return true;
}