forked from teamnwah/openmw-tes3coop
We can apply vsync at runtime now that the Ogre bug is fixed.
This commit is contained in:
parent
f504ab42fe
commit
fa264935ff
2 changed files with 11 additions and 0 deletions
|
@ -363,8 +363,12 @@ namespace MWGui
|
||||||
else if (_sender == mVSyncButton)
|
else if (_sender == mVSyncButton)
|
||||||
{
|
{
|
||||||
Settings::Manager::setBool("vsync", "Video", newState);
|
Settings::Manager::setBool("vsync", "Video", newState);
|
||||||
|
// Ogre::Window::setVSyncEnabled is bugged in 1.8
|
||||||
|
#if OGRE_VERSION < (1 << 16 | 9 << 8 | 0)
|
||||||
MWBase::Environment::get().getWindowManager()->
|
MWBase::Environment::get().getWindowManager()->
|
||||||
messageBox("VSync will be applied after a restart", std::vector<std::string>());
|
messageBox("VSync will be applied after a restart", std::vector<std::string>());
|
||||||
|
#endif
|
||||||
|
apply();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -760,6 +760,13 @@ void RenderingManager::processChangedSettings(const Settings::CategorySettingVec
|
||||||
|| it->second == "resolution y"
|
|| it->second == "resolution y"
|
||||||
|| it->second == "fullscreen"))
|
|| it->second == "fullscreen"))
|
||||||
changeRes = true;
|
changeRes = true;
|
||||||
|
else if (it->first == "Video" && it->second == "vsync")
|
||||||
|
{
|
||||||
|
// setVSyncEnabled is bugged in 1.8
|
||||||
|
#if OGRE_VERSION >= (1 << 16 | 9 << 8 | 0)
|
||||||
|
mRendering.getWindow()->setVSyncEnabled(Settings::Manager::getBool("vsync", "Video"));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
else if (it->second == "field of view" && it->first == "General")
|
else if (it->second == "field of view" && it->first == "General")
|
||||||
mRendering.setFov(Settings::Manager::getFloat("field of view", "General"));
|
mRendering.setFov(Settings::Manager::getFloat("field of view", "General"));
|
||||||
else if ((it->second == "texture filtering" && it->first == "General")
|
else if ((it->second == "texture filtering" && it->first == "General")
|
||||||
|
|
Loading…
Reference in a new issue