mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
refactor: make Minecraft resource URL override consistent with other overrides
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
33deb1da3f
commit
3f0af19ed3
5 changed files with 21 additions and 7 deletions
|
|
@ -872,13 +872,13 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
|
|||
m_settings->reset("MetaURLOverride");
|
||||
|
||||
// Resource URL
|
||||
m_settings->registerSetting("ResourceURL", BuildConfig.DEFAULT_RESOURCE_BASE);
|
||||
m_settings->registerSetting({ "ResourceURLOverride", "ResourceURL" }, "");
|
||||
|
||||
QUrl resourceUrl(m_settings->get("ResourceURL").toString());
|
||||
QUrl resourceUrl(m_settings->get("ResourceURLOverride").toString());
|
||||
|
||||
// get rid of invalid resource urls
|
||||
if (!resourceUrl.isValid() || (resourceUrl.scheme() != "http" && resourceUrl.scheme() != "https"))
|
||||
m_settings->reset("ResourceURL");
|
||||
m_settings->reset("ResourceURLOverride");
|
||||
}
|
||||
|
||||
m_settings->registerSetting("CloseAfterLaunch", false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue