mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 18:29:55 +00:00
Merge branch 'launcher' into 'master'
Launcher consistency fixes See merge request OpenMW/openmw!1983
This commit is contained in:
commit
787f8fb627
4 changed files with 20 additions and 13 deletions
|
@ -312,19 +312,24 @@ void Launcher::AdvancedPage::saveSettings()
|
|||
saveSettingBool(postprocessEnabledCheckBox, "enabled", "Post Processing");
|
||||
saveSettingBool(postprocessLiveReloadCheckBox, "live reload", "Post Processing");
|
||||
saveSettingBool(postprocessTransparentPostpassCheckBox, "transparent postpass", "Post Processing");
|
||||
Settings::Manager::setDouble("hdr exposure time", "Post Processing", postprocessHDRTimeComboBox->value());
|
||||
double hdrExposureTime = postprocessHDRTimeComboBox->value();
|
||||
if (hdrExposureTime != Settings::Manager::getDouble("hdr exposure time", "Post Processing"))
|
||||
Settings::Manager::setDouble("hdr exposure time", "Post Processing", hdrExposureTime);
|
||||
}
|
||||
|
||||
// Audio
|
||||
{
|
||||
int audioDeviceIndex = audioDeviceSelectorComboBox->currentIndex();
|
||||
std::string prevAudioDevice = Settings::Manager::getString("device", "Sound");
|
||||
if (audioDeviceIndex != 0)
|
||||
{
|
||||
Settings::Manager::setString("device", "Sound", audioDeviceSelectorComboBox->currentText().toUtf8().constData());
|
||||
const std::string& newAudioDevice = audioDeviceSelectorComboBox->currentText().toUtf8().constData();
|
||||
if (newAudioDevice != prevAudioDevice)
|
||||
Settings::Manager::setString("device", "Sound", newAudioDevice);
|
||||
}
|
||||
else
|
||||
else if (!prevAudioDevice.empty())
|
||||
{
|
||||
Settings::Manager::setString("device", "Sound", "");
|
||||
Settings::Manager::setString("device", "Sound", {});
|
||||
}
|
||||
int hrtfEnabledIndex = enableHRTFComboBox->currentIndex() - 1;
|
||||
if (hrtfEnabledIndex != Settings::Manager::getInt("hrtf enable", "Sound"))
|
||||
|
@ -332,13 +337,16 @@ void Launcher::AdvancedPage::saveSettings()
|
|||
Settings::Manager::setInt("hrtf enable", "Sound", hrtfEnabledIndex);
|
||||
}
|
||||
int selectedHRTFProfileIndex = hrtfProfileSelectorComboBox->currentIndex();
|
||||
std::string prevHRTFProfile = Settings::Manager::getString("hrtf", "Sound");
|
||||
if (selectedHRTFProfileIndex != 0)
|
||||
{
|
||||
Settings::Manager::setString("hrtf", "Sound", hrtfProfileSelectorComboBox->currentText().toUtf8().constData());
|
||||
const std::string& newHRTFProfile = hrtfProfileSelectorComboBox->currentText().toUtf8().constData();
|
||||
if (newHRTFProfile != prevHRTFProfile)
|
||||
Settings::Manager::setString("hrtf", "Sound", newHRTFProfile);
|
||||
}
|
||||
else
|
||||
else if (!prevHRTFProfile.empty())
|
||||
{
|
||||
Settings::Manager::setString("hrtf", "Sound", "");
|
||||
Settings::Manager::setString("hrtf", "Sound", {});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -233,7 +233,9 @@ void Launcher::GraphicsPage::saveSettings()
|
|||
|
||||
// Lighting
|
||||
static std::array<std::string, 3> lightingMethodMap = {"legacy", "shaders compatibility", "shaders"};
|
||||
Settings::Manager::setString("lighting method", "Shaders", lightingMethodMap[lightingMethodComboBox->currentIndex()]);
|
||||
const std::string& cLightingMethod = lightingMethodMap[lightingMethodComboBox->currentIndex()];
|
||||
if (cLightingMethod != Settings::Manager::getString("lighting method", "Shaders"))
|
||||
Settings::Manager::setString("lighting method", "Shaders", cLightingMethod);
|
||||
|
||||
// Shadows
|
||||
int cShadowDist = shadowDistanceCheckBox->checkState() != Qt::Unchecked ? shadowDistanceSpinBox->value() : 0;
|
||||
|
|
|
@ -34,9 +34,6 @@
|
|||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="contentGroupBox">
|
||||
<property name="title">
|
||||
<string>Content</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
|
|
|
@ -156,7 +156,7 @@
|
|||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
<string>Navigation mesh cache</string>
|
||||
<string>Navigation Mesh Cache</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
|
|
Loading…
Reference in a new issue