From a8621e62308abafae018e30c76f3f2feddd5edcb Mon Sep 17 00:00:00 2001 From: mrcheko Date: Fri, 2 Jan 2015 16:49:22 +0300 Subject: [PATCH] defaults are set to 1.0; remove contrast setting (can be changed in config though); disable gamma control for not Windows OSs --- apps/openmw/mwgui/settingswindow.cpp | 14 +++++++++++++ apps/openmw/mwrender/renderingmanager.cpp | 2 +- files/mygui/openmw_settings_window.layout | 25 ++++++----------------- files/settings-default.cfg | 4 ++-- 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/apps/openmw/mwgui/settingswindow.cpp b/apps/openmw/mwgui/settingswindow.cpp index ce2a20d8b..05664386b 100644 --- a/apps/openmw/mwgui/settingswindow.cpp +++ b/apps/openmw/mwgui/settingswindow.cpp @@ -182,6 +182,20 @@ namespace MWGui getWidget(mRefractionButton, "RefractionButton"); getWidget(mDifficultySlider, "DifficultySlider"); +#ifndef WIN32 + // hide gamma controls since it currently does not work under Linux + MyGUI::ScrollBar *gammaSlider; + getWidget(gammaSlider, "GammaSlider"); + gammaSlider->setVisible(false); + MyGUI::TextBox *textBox; + getWidget(textBox, "GammaText"); + textBox->setVisible(false); + getWidget(textBox, "GammaTextDark"); + textBox->setVisible(false); + getWidget(textBox, "GammaTextLight"); + textBox->setVisible(false); +#endif + mMainWidget->castType()->eventWindowChangeCoord += MyGUI::newDelegate(this, &SettingsWindow::onWindowResize); mOkButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SettingsWindow::onOkButtonClicked); diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index 44edcf03b..3aff46d43 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -757,7 +757,7 @@ void RenderingManager::processChangedSettings(const Settings::CategorySettingVec changeRes = true; else if (it->second == "field of view" && it->first == "General") mRendering.setFov(Settings::Manager::getFloat("field of view", "General")); - else if ((it->second == "gamma" || it->second == "contrast") && it->first == "General") + else if (it->second == "gamma" && it->first == "General") { mRendering.setWindowGammaContrast(Settings::Manager::getFloat("gamma", "General"), Settings::Manager::getFloat("contrast", "General")); } diff --git a/files/mygui/openmw_settings_window.layout b/files/mygui/openmw_settings_window.layout index 8fd3d8af1..4a993e140 100644 --- a/files/mygui/openmw_settings_window.layout +++ b/files/mygui/openmw_settings_window.layout @@ -1,8 +1,8 @@  - + - + @@ -214,7 +214,7 @@ - + @@ -305,27 +305,14 @@ - + - + - - - - - - - - - - - - - @@ -504,7 +491,7 @@ - + diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 6bd10dc21..0a55a286b 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -48,8 +48,8 @@ werewolf overlay = true [General] # Camera field of view field of view = 55 -gamma = 1.34 -contrast = 0.98 +gamma = 1.00 +contrast = 1.00 # Texture filtering mode. valid values: # none