mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-26 16:11:39 +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(postprocessEnabledCheckBox, "enabled", "Post Processing");
|
||||||
saveSettingBool(postprocessLiveReloadCheckBox, "live reload", "Post Processing");
|
saveSettingBool(postprocessLiveReloadCheckBox, "live reload", "Post Processing");
|
||||||
saveSettingBool(postprocessTransparentPostpassCheckBox, "transparent postpass", "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
|
// Audio
|
||||||
{
|
{
|
||||||
int audioDeviceIndex = audioDeviceSelectorComboBox->currentIndex();
|
int audioDeviceIndex = audioDeviceSelectorComboBox->currentIndex();
|
||||||
|
std::string prevAudioDevice = Settings::Manager::getString("device", "Sound");
|
||||||
if (audioDeviceIndex != 0)
|
if (audioDeviceIndex != 0)
|
||||||
{
|
{
|
||||||
Settings::Manager::setString("device", "Sound", audioDeviceSelectorComboBox->currentText().toUtf8().constData());
|
const std::string& newAudioDevice = audioDeviceSelectorComboBox->currentText().toUtf8().constData();
|
||||||
}
|
if (newAudioDevice != prevAudioDevice)
|
||||||
else
|
Settings::Manager::setString("device", "Sound", newAudioDevice);
|
||||||
|
}
|
||||||
|
else if (!prevAudioDevice.empty())
|
||||||
{
|
{
|
||||||
Settings::Manager::setString("device", "Sound", "");
|
Settings::Manager::setString("device", "Sound", {});
|
||||||
}
|
}
|
||||||
int hrtfEnabledIndex = enableHRTFComboBox->currentIndex() - 1;
|
int hrtfEnabledIndex = enableHRTFComboBox->currentIndex() - 1;
|
||||||
if (hrtfEnabledIndex != Settings::Manager::getInt("hrtf enable", "Sound"))
|
if (hrtfEnabledIndex != Settings::Manager::getInt("hrtf enable", "Sound"))
|
||||||
|
@ -332,13 +337,16 @@ void Launcher::AdvancedPage::saveSettings()
|
||||||
Settings::Manager::setInt("hrtf enable", "Sound", hrtfEnabledIndex);
|
Settings::Manager::setInt("hrtf enable", "Sound", hrtfEnabledIndex);
|
||||||
}
|
}
|
||||||
int selectedHRTFProfileIndex = hrtfProfileSelectorComboBox->currentIndex();
|
int selectedHRTFProfileIndex = hrtfProfileSelectorComboBox->currentIndex();
|
||||||
|
std::string prevHRTFProfile = Settings::Manager::getString("hrtf", "Sound");
|
||||||
if (selectedHRTFProfileIndex != 0)
|
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
|
// Lighting
|
||||||
static std::array<std::string, 3> lightingMethodMap = {"legacy", "shaders compatibility", "shaders"};
|
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
|
// Shadows
|
||||||
int cShadowDist = shadowDistanceCheckBox->checkState() != Qt::Unchecked ? shadowDistanceSpinBox->value() : 0;
|
int cShadowDist = shadowDistanceCheckBox->checkState() != Qt::Unchecked ? shadowDistanceSpinBox->value() : 0;
|
||||||
|
|
|
@ -34,9 +34,6 @@
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="contentGroupBox">
|
<widget class="QGroupBox" name="contentGroupBox">
|
||||||
<property name="title">
|
|
||||||
<string>Content</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
|
|
|
@ -156,7 +156,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tab_2">
|
<widget class="QWidget" name="tab_2">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Navigation mesh cache</string>
|
<string>Navigation Mesh Cache</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
|
|
Loading…
Reference in a new issue