mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-29 09:10:08 -06:00
add back vsync
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user