Always show actual vsync setting in the interface instead of desired setting.

master
safety0ff 2011-07-17 16:46:08 +00:00
parent d71934c8e5
commit 195159406d
2 changed files with 4 additions and 4 deletions

View File

@ -944,17 +944,16 @@ bool runVideoOptionsMenu(void)
case FRONTEND_VSYNC: case FRONTEND_VSYNC:
case FRONTEND_VSYNC_R: case FRONTEND_VSYNC_R:
{ {
WzMainWindow::instance()->setSwapInterval(!war_GetVsync());
war_SetVsync(WzMainWindow::instance()->swapInterval() > 0);
if (war_GetVsync()) if (war_GetVsync())
{ {
war_SetVsync(false);
widgSetString(psWScreen, FRONTEND_VSYNC_R, _("Off")); widgSetString(psWScreen, FRONTEND_VSYNC_R, _("Off"));
} }
else else
{ {
war_SetVsync(true);
widgSetString(psWScreen, FRONTEND_VSYNC_R, _("On")); widgSetString(psWScreen, FRONTEND_VSYNC_R, _("On"));
} }
WzMainWindow::instance()->setSwapInterval(war_GetVsync());
break; break;
} }

View File

@ -1299,6 +1299,7 @@ int main(int argc, char *argv[])
} }
mainwindow.setSwapInterval(war_GetVsync()); mainwindow.setSwapInterval(war_GetVsync());
war_SetVsync(mainwindow.swapInterval() > 0);
mainwindow.setReadyToPaint(); mainwindow.setReadyToPaint();