From 0d6fd122312af71c4c0796ea7d8199bc2f58299c Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 24 Feb 2024 22:49:38 -0500 Subject: glue: load initial year setting as s32 --- src/core/hle/service/glue/time/manager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core/hle/service') 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& 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(year), .month = 1, .day = 1, .hour = 0, .minute = 0, .second = 0, }; - set_sys->GetSettingsItemValueImpl(calendar.year, "time", - "standard_user_clock_initial_year"); return CalendarTimeToEpoch(calendar); } -- cgit v1.2.3