diff options
author | flow <flowlnlnln@gmail.com> | 2022-07-12 21:15:59 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-07-12 21:15:59 -0300 |
commit | 509f7bd018f48c289526dc7a7be7009aed14f6b9 (patch) | |
tree | ce84f45537364f24f363db005f214551beda96b2 /launcher/BaseInstance.cpp | |
parent | 273cf3d5655a6b2973191bf5403bfbe9a9b8ba15 (diff) | |
download | PrismLauncher-509f7bd018f48c289526dc7a7be7009aed14f6b9.tar.gz PrismLauncher-509f7bd018f48c289526dc7a7be7009aed14f6b9.tar.bz2 PrismLauncher-509f7bd018f48c289526dc7a7be7009aed14f6b9.zip |
fix: move time record overrides to BaseInstance
This is needed so that we can show time stats in the UI without having
to load all type-specific settings, which would make all the previous
changes useless :c
This is apparently done with console settings too, so I don't think
there's a problem doing this too :>
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/BaseInstance.cpp')
-rw-r--r-- | launcher/BaseInstance.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/launcher/BaseInstance.cpp b/launcher/BaseInstance.cpp index c9cfef88..35c26eb7 100644 --- a/launcher/BaseInstance.cpp +++ b/launcher/BaseInstance.cpp @@ -58,10 +58,16 @@ BaseInstance::BaseInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr s m_settings->registerSetting("name", "Unnamed Instance"); m_settings->registerSetting("iconKey", "default"); m_settings->registerSetting("notes", ""); + m_settings->registerSetting("lastLaunchTime", 0); m_settings->registerSetting("totalTimePlayed", 0); m_settings->registerSetting("lastTimePlayed", 0); + // Game time override + auto gameTimeOverride = m_settings->registerSetting("OverrideGameTime", false); + m_settings->registerOverride(globalSettings->getSetting("ShowGameTime"), gameTimeOverride); + m_settings->registerOverride(globalSettings->getSetting("RecordGameTime"), gameTimeOverride); + // NOTE: Sometimees InstanceType is already registered, as it was used to identify the type of // a locally stored instance if (!m_settings->getSetting("InstanceType")) |