diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2024-02-25 15:47:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-25 15:47:16 +0100 |
commit | 9e27dbb53b854d83b4c9667db9e29652616f798a (patch) | |
tree | 566cb684c001a3cf53abed688813ecaf37a652d1 | |
parent | Merge pull request #13155 from german77/GetSettingsItemValue (diff) | |
parent | glue: load initial year setting as s32 (diff) | |
download | yuzu-9e27dbb53b854d83b4c9667db9e29652616f798a.tar yuzu-9e27dbb53b854d83b4c9667db9e29652616f798a.tar.gz yuzu-9e27dbb53b854d83b4c9667db9e29652616f798a.tar.bz2 yuzu-9e27dbb53b854d83b4c9667db9e29652616f798a.tar.lz yuzu-9e27dbb53b854d83b4c9667db9e29652616f798a.tar.xz yuzu-9e27dbb53b854d83b4c9667db9e29652616f798a.tar.zst yuzu-9e27dbb53b854d83b4c9667db9e29652616f798a.zip |
-rw-r--r-- | src/core/hle/service/glue/time/manager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/hle/service/glue/time/manager.cpp b/src/core/hle/service/glue/time/manager.cpp index 059ac3fc9..cb88486dd 100644 --- a/src/core/hle/service/glue/time/manager.cpp +++ b/src/core/hle/service/glue/time/manager.cpp @@ -51,16 +51,17 @@ s64 CalendarTimeToEpoch(Service::PSC::Time::CalendarTime calendar) { } s64 GetEpochTimeFromInitialYear(std::shared_ptr<Service::Set::ISystemSettingsServer>& set_sys) { + s32 year{2000}; + set_sys->GetSettingsItemValueImpl(year, "time", "standard_user_clock_initial_year"); + Service::PSC::Time::CalendarTime calendar{ - .year = 2000, + .year = static_cast<s16>(year), .month = 1, .day = 1, .hour = 0, .minute = 0, .second = 0, }; - set_sys->GetSettingsItemValueImpl<s16>(calendar.year, "time", - "standard_user_clock_initial_year"); return CalendarTimeToEpoch(calendar); } |