Merge pull request #443 from TheKodeToad/skinfix

Add legacy skin fix
This commit is contained in:
TheKodeToad
2023-10-15 21:46:29 +01:00
committed by GitHub
28 changed files with 1520 additions and 84 deletions

View File

@ -119,6 +119,9 @@ void MinecraftPage::applySettings()
// Miscellaneous
s->set("CloseAfterLaunch", ui->closeAfterLaunchCheck->isChecked());
s->set("QuitAfterGameStop", ui->quitAfterGameStopCheck->isChecked());
// Legacy settings
s->set("OnlineFixes", ui->onlineFixes->isChecked());
}
void MinecraftPage::loadSettings()
@ -170,6 +173,8 @@ void MinecraftPage::loadSettings()
ui->closeAfterLaunchCheck->setChecked(s->get("CloseAfterLaunch").toBool());
ui->quitAfterGameStopCheck->setChecked(s->get("QuitAfterGameStop").toBool());
ui->onlineFixes->setChecked(s->get("OnlineFixes").toBool());
}
void MinecraftPage::retranslate()

View File

@ -138,7 +138,7 @@
</property>
</widget>
</item>
<item>
<item>
<widget class="QCheckBox" name="showGameTimeWithoutDays">
<property name="text">
<string>Show time spent playing in hours</string>
@ -197,6 +197,25 @@
<string>Tweaks</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_12">
<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">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Emulates usages of old online services which are no longer operating.&lt;/p&gt;&lt;p&gt;This currently allows modern skins to be used.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Enable online fixes (experimental)</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="nativeLibWorkaroundGroupBox">
<property name="title">

View File

@ -3,6 +3,7 @@
* Prism Launcher - Minecraft Launcher
* Copyright (c) 2022 Jamie Mansfield <jmansfield@cadixdev.org>
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
* Copyright (C) 2022 TheKodeToad <TheKodeToad@proton.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -253,6 +254,14 @@ void InstanceSettingsPage::applySettings()
m_settings->reset("InstanceAccountId");
}
bool overrideLegacySettings = ui->legacySettingsGroupBox->isChecked();
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
m_instance->updateRuntimeContext();
}
@ -356,6 +365,9 @@ void InstanceSettingsPage::loadSettings()
ui->instanceAccountGroupBox->setChecked(m_settings->get("UseAccountForInstance").toBool());
updateAccountsMenu();
ui->legacySettingsGroupBox->setChecked(m_settings->get("OverrideLegacySettings").toBool());
ui->onlineFixes->setChecked(m_settings->get("OnlineFixes").toBool());
}
void InstanceSettingsPage::on_javaDetectBtn_clicked()

View File

@ -583,6 +583,31 @@
<string>Miscellaneous</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_9">
<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">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Emulates usages of old online services which are no longer operating.&lt;/p&gt;&lt;p&gt;This currently allows modern skins to be used.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Enable online fixes (experimental)</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gameTimeGroupBox">
<property name="enabled">