diff options
author | flow <flowlnlnln@gmail.com> | 2022-06-12 13:46:46 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-12 13:46:46 -0300 |
commit | 794022d399294c2ac377e4e62b65758117e5bdac (patch) | |
tree | be8a08cd7a64e9520450c06e96d2cd7669d0ab36 /launcher | |
parent | 2212a6e40fae329a0e15f1c4ad7249f240d690e0 (diff) | |
parent | 8a0aa5a0c852c3a8043d24831be30ccc89aa32d0 (diff) | |
download | PrismLauncher-794022d399294c2ac377e4e62b65758117e5bdac.tar.gz PrismLauncher-794022d399294c2ac377e4e62b65758117e5bdac.tar.bz2 PrismLauncher-794022d399294c2ac377e4e62b65758117e5bdac.zip |
Merge pull request #783 from Scrumplex/fix-avoid-settings-register-warnings
Avoid re-registering InstanceType
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/BaseInstance.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/launcher/BaseInstance.cpp b/launcher/BaseInstance.cpp index 0240afa8..f02205e9 100644 --- a/launcher/BaseInstance.cpp +++ b/launcher/BaseInstance.cpp @@ -59,7 +59,11 @@ BaseInstance::BaseInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr s m_settings->registerSetting("lastLaunchTime", 0); m_settings->registerSetting("totalTimePlayed", 0); m_settings->registerSetting("lastTimePlayed", 0); - m_settings->registerSetting("InstanceType", ""); + + // NOTE: Sometimees InstanceType is already registered, as it was used to identify the type of + // a locally stored instance + if (!m_settings->getSetting("InstanceType")) + m_settings->registerSetting("InstanceType", ""); // Custom Commands auto commandSetting = m_settings->registerSetting({"OverrideCommands","OverrideLaunchCmd"}, false); |