add back vsync

This commit is contained in:
RSDuck
2022-10-04 13:15:50 +02:00
parent 7e09c23f1d
commit 2f0c89cbe9
2 changed files with 20 additions and 15 deletions

View File

@ -426,6 +426,8 @@ void EmuThread::initOpenGL()
static_cast<ScreenPanelGL*>(mainWindow->panel)->transferLayout(this);
OSD::Init(true);
oglContext->SetSwapInterval(Config::ScreenVSync ? Config::ScreenVSyncInterval : 0);
}
void EmuThread::deinitOpenGL()
@ -543,7 +545,9 @@ void EmuThread::run()
videoRenderer = 0;
}
else
{
videoRenderer = hasOGL ? Config::_3DRenderer : 0;
}
videoSettingsDirty = false;
@ -551,6 +555,11 @@ void EmuThread::run()
videoSettings.GL_ScaleFactor = Config::GL_ScaleFactor;
videoSettings.GL_BetterPolygons = Config::GL_BetterPolygons;
if (hasOGL)
{
oglContext->SetSwapInterval(Config::ScreenVSync ? Config::ScreenVSyncInterval : 0);
}
GPU::SetRenderSettings(videoRenderer, videoSettings);
}