Fix v-sync functionality

This commit is contained in:
Brad Davis 2015-08-01 22:10:47 -07:00
parent 5c07a7d85b
commit 8ac33453b5

View file

@ -4274,6 +4274,7 @@ void Application::takeSnapshot() {
} }
void Application::setVSyncEnabled() { void Application::setVSyncEnabled() {
_glWidget->makeCurrent();
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
bool vsyncOn = Menu::getInstance()->isOptionChecked(MenuOption::RenderTargetFramerateVSyncOn); bool vsyncOn = Menu::getInstance()->isOptionChecked(MenuOption::RenderTargetFramerateVSyncOn);
if (wglewGetExtension("WGL_EXT_swap_control")) { if (wglewGetExtension("WGL_EXT_swap_control")) {
@ -4298,6 +4299,7 @@ void Application::setVSyncEnabled() {
#else #else
qCDebug(interfaceapp, "V-Sync is FORCED ON on this system\n"); qCDebug(interfaceapp, "V-Sync is FORCED ON on this system\n");
#endif #endif
_offscreenContext->makeCurrent();
} }
void Application::setThrottleFPSEnabled() { void Application::setThrottleFPSEnabled() {