Fix the problem. Still need to leave the loop with SDL even if we supply a swap function.

This commit is contained in:
Henrik Rydgård
2023-01-30 15:45:05 +01:00
parent d43452f0ce
commit cb16f193ec
5 changed files with 10 additions and 4 deletions

View File

@@ -432,7 +432,7 @@ bool WindowsGLContext::InitFromRenderThread(std::string *error_message) {
renderManager_ = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
renderManager_->SetInflightFrames(g_Config.iInflightFrames);
SetGPUBackend(GPUBackend::OPENGL);
renderManager_->SetSwapFunction([&]() {::SwapBuffers(hDC); });
renderManager_->SetSwapFunction([&]() {::SwapBuffers(hDC); }, true);
if (wglSwapIntervalEXT) {
// glew loads wglSwapIntervalEXT if available
renderManager_->SetSwapIntervalFunction([&](int interval) {