refactor: make Minecraft resource URL override consistent with other overrides

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle 2026-01-25 16:21:49 +05:00
parent 33deb1da3f
commit 3f0af19ed3
No known key found for this signature in database
GPG key ID: B77C34313AEE1FFF
5 changed files with 21 additions and 7 deletions

View file

@ -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);