aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorLiam <[email protected]>2024-02-24 22:49:38 -0500
committerLiam <[email protected]>2024-02-24 22:49:38 -0500
commit0d6fd122312af71c4c0796ea7d8199bc2f58299c (patch)
tree566cb684c001a3cf53abed688813ecaf37a652d1 /src/core
parenta93d249ac161e190b8c7046917bd9a3b6e79a0e0 (diff)
downloadyuzu-mainline-0d6fd122312af71c4c0796ea7d8199bc2f58299c.tar.gz
yuzu-mainline-0d6fd122312af71c4c0796ea7d8199bc2f58299c.zip
glue: load initial year setting as s32
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/glue/time/manager.cpp7
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);
}