Use override-based setting for online fixes
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
c37e1fb9f1
commit
d48dd7eb6a
@ -614,6 +614,9 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
|
|||||||
// Mod loader settings
|
// Mod loader settings
|
||||||
m_settings->registerSetting("DisableQuiltBeacon", false);
|
m_settings->registerSetting("DisableQuiltBeacon", false);
|
||||||
|
|
||||||
|
// Legacy settings
|
||||||
|
m_settings->registerSetting("OnlineFixes", true);
|
||||||
|
|
||||||
// Native library workarounds
|
// Native library workarounds
|
||||||
m_settings->registerSetting("UseNativeOpenAL", false);
|
m_settings->registerSetting("UseNativeOpenAL", false);
|
||||||
m_settings->registerSetting("UseNativeGLFW", false);
|
m_settings->registerSetting("UseNativeGLFW", false);
|
||||||
|
@ -191,6 +191,10 @@ void MinecraftInstance::loadSpecificSettings()
|
|||||||
auto modLoaderSettings = m_settings->registerSetting("OverrideModLoaderSettings", false);
|
auto modLoaderSettings = m_settings->registerSetting("OverrideModLoaderSettings", false);
|
||||||
m_settings->registerOverride(global_settings->getSetting("DisableQuiltBeacon"), modLoaderSettings);
|
m_settings->registerOverride(global_settings->getSetting("DisableQuiltBeacon"), modLoaderSettings);
|
||||||
|
|
||||||
|
// Legacy-related options
|
||||||
|
auto legacySettings = m_settings->registerSetting("OverrideLegacySettings", true);
|
||||||
|
m_settings->registerOverride(global_settings->getSetting("OnlineFixes"), legacySettings);
|
||||||
|
|
||||||
m_settings->set("InstanceType", "OneSix");
|
m_settings->set("InstanceType", "OneSix");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,8 +206,6 @@ void MinecraftInstance::loadSpecificSettings()
|
|||||||
m_settings->registerSetting("UseAccountForInstance", false);
|
m_settings->registerSetting("UseAccountForInstance", false);
|
||||||
m_settings->registerSetting("InstanceAccountId", "");
|
m_settings->registerSetting("InstanceAccountId", "");
|
||||||
|
|
||||||
m_settings->registerSetting("OnlineFixes", true);
|
|
||||||
|
|
||||||
qDebug() << "Instance-type specific settings were loaded!";
|
qDebug() << "Instance-type specific settings were loaded!";
|
||||||
|
|
||||||
setSpecificSettingsLoaded(true);
|
setSpecificSettingsLoaded(true);
|
||||||
|
@ -103,6 +103,9 @@ void MinecraftPage::applySettings()
|
|||||||
|
|
||||||
// Mod loader settings
|
// Mod loader settings
|
||||||
s->set("DisableQuiltBeacon", ui->disableQuiltBeaconCheckBox->isChecked());
|
s->set("DisableQuiltBeacon", ui->disableQuiltBeaconCheckBox->isChecked());
|
||||||
|
|
||||||
|
// Legacy settings
|
||||||
|
s->set("OnlineFixes", ui->onlineFixes->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MinecraftPage::loadSettings()
|
void MinecraftPage::loadSettings()
|
||||||
@ -143,6 +146,8 @@ void MinecraftPage::loadSettings()
|
|||||||
ui->quitAfterGameStopCheck->setChecked(s->get("QuitAfterGameStop").toBool());
|
ui->quitAfterGameStopCheck->setChecked(s->get("QuitAfterGameStop").toBool());
|
||||||
|
|
||||||
ui->disableQuiltBeaconCheckBox->setChecked(s->get("DisableQuiltBeacon").toBool());
|
ui->disableQuiltBeaconCheckBox->setChecked(s->get("DisableQuiltBeacon").toBool());
|
||||||
|
|
||||||
|
ui->onlineFixes->setChecked(s->get("OnlineFixes").toBool());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MinecraftPage::retranslate()
|
void MinecraftPage::retranslate()
|
||||||
|
@ -198,11 +198,30 @@
|
|||||||
<layout class="QVBoxLayout" name="verticalLayout_13">
|
<layout class="QVBoxLayout" name="verticalLayout_13">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="disableQuiltBeaconCheckBox">
|
<widget class="QCheckBox" name="disableQuiltBeaconCheckBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Disable Quilt loader's beacon for counting monthly active users</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Disable Quilt Loader Beacon</string>
|
<string>Disable Quilt Loader Beacon</string>
|
||||||
</property>
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="legacySettingsGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Legacy settings</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="onlineFixes">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Disable Quilt loader's beacon for counting monthly active users</string>
|
<string><html><head/><body><p>Emulates usages of old online services which are no longer operating.</p><p>This currently allows modern skins to be used.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable online fixes</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -290,8 +290,13 @@ void InstanceSettingsPage::applySettings()
|
|||||||
m_settings->reset("DisableQuiltBeacon");
|
m_settings->reset("DisableQuiltBeacon");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool onlineFixes = ui->onlineFixes->isChecked();
|
bool overrideLegacySettings = ui->legacySettingsGroupBox->isChecked();
|
||||||
m_settings->set("OnlineFixes", onlineFixes);
|
m_settings->set("OverrideLegacySettings", overrideLegacySettings);
|
||||||
|
if (overrideLegacySettings) {
|
||||||
|
m_settings->set("OnlineFixes", ui->onlineFixes->isChecked());
|
||||||
|
} else {
|
||||||
|
m_settings->reset("OnlineFixes");
|
||||||
|
}
|
||||||
|
|
||||||
// FIXME: This should probably be called by a signal instead
|
// FIXME: This should probably be called by a signal instead
|
||||||
m_instance->updateRuntimeContext();
|
m_instance->updateRuntimeContext();
|
||||||
@ -398,8 +403,8 @@ void InstanceSettingsPage::loadSettings()
|
|||||||
ui->modLoaderSettingsGroupBox->setChecked(m_settings->get("OverrideModLoaderSettings").toBool());
|
ui->modLoaderSettingsGroupBox->setChecked(m_settings->get("OverrideModLoaderSettings").toBool());
|
||||||
ui->disableQuiltBeaconCheckBox->setChecked(m_settings->get("DisableQuiltBeacon").toBool());
|
ui->disableQuiltBeaconCheckBox->setChecked(m_settings->get("DisableQuiltBeacon").toBool());
|
||||||
|
|
||||||
|
ui->legacySettingsGroupBox->setChecked(m_settings->get("OverrideLegacySettings").toBool());
|
||||||
ui->onlineFixes->setChecked(m_settings->get("OnlineFixes").toBool());
|
ui->onlineFixes->setChecked(m_settings->get("OnlineFixes").toBool());
|
||||||
ui->onlineFixes->setVisible(m_instance->traits().contains("legacyServices"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstanceSettingsPage::on_javaDetectBtn_clicked()
|
void InstanceSettingsPage::on_javaDetectBtn_clicked()
|
||||||
|
@ -543,23 +543,48 @@
|
|||||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="modLoaderSettingsGroupBox">
|
<widget class="QGroupBox" name="modLoaderSettingsGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Mod loader settings</string>
|
||||||
|
</property>
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
|
||||||
<string>Mod loader settings</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="VerticalLayout_16">
|
<layout class="QVBoxLayout" name="VerticalLayout_16">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="disableQuiltBeaconCheckBox">
|
<widget class="QCheckBox" name="disableQuiltBeaconCheckBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Disable Quilt loader's beacon for counting monthly active users</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Disable Quilt Loader Beacon</string>
|
<string>Disable Quilt Loader Beacon</string>
|
||||||
</property>
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="legacySettingsGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Legacy settings</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_17">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="onlineFixes">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Disable Quilt loader's beacon for counting monthly active users</string>
|
<string><html><head/><body><p>Emulates usages of old online services which are no longer operating.</p><p>This currently allows modern skins to be used.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable online fixes</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -668,16 +693,6 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="onlineFixes">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Fixes usages of old online services which are no longer operating by emulating them or redirecting to their modern counterparts.</p><p>This currently only allows modern skins to be used.</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable online fixes</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacerMiscellaneous">
|
<spacer name="verticalSpacerMiscellaneous">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user