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_R:
{
WzMainWindow::instance()->setSwapInterval(!war_GetVsync());
war_SetVsync(WzMainWindow::instance()->swapInterval() > 0);
if (war_GetVsync())
{
war_SetVsync(false);
widgSetString(psWScreen, FRONTEND_VSYNC_R, _("Off"));
}
else
{
war_SetVsync(true);
widgSetString(psWScreen, FRONTEND_VSYNC_R, _("On"));
}
WzMainWindow::instance()->setSwapInterval(war_GetVsync());
break;
}

View File

@ -1294,11 +1294,12 @@ int main(int argc, char *argv[])
else
{
mainwindow.show();
mainwindow.setMinimumSize(w, h);
mainwindow.setMinimumSize(w, h);
mainwindow.setMaximumSize(w, h);
}
mainwindow.setSwapInterval(war_GetVsync());
war_SetVsync(mainwindow.swapInterval() > 0);
mainwindow.setReadyToPaint();