diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2024-02-16 19:11:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-16 19:11:36 +0100 |
commit | c7588c042ba14bce871d12f5cf4dbf64bb5b3fe9 (patch) | |
tree | 59e23eb8b42ec44318ca00f8972a33fe7181984c /src/core/hle/service/glue/time/static.cpp | |
parent | Merge pull request #13011 from liamwhite/vi-ipc (diff) | |
parent | service: set: Migrate ISystemSettingsServer to new IPC (diff) | |
download | yuzu-c7588c042ba14bce871d12f5cf4dbf64bb5b3fe9.tar yuzu-c7588c042ba14bce871d12f5cf4dbf64bb5b3fe9.tar.gz yuzu-c7588c042ba14bce871d12f5cf4dbf64bb5b3fe9.tar.bz2 yuzu-c7588c042ba14bce871d12f5cf4dbf64bb5b3fe9.tar.lz yuzu-c7588c042ba14bce871d12f5cf4dbf64bb5b3fe9.tar.xz yuzu-c7588c042ba14bce871d12f5cf4dbf64bb5b3fe9.tar.zst yuzu-c7588c042ba14bce871d12f5cf4dbf64bb5b3fe9.zip |
Diffstat (limited to 'src/core/hle/service/glue/time/static.cpp')
-rw-r--r-- | src/core/hle/service/glue/time/static.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/core/hle/service/glue/time/static.cpp b/src/core/hle/service/glue/time/static.cpp index f8c1218f3..ec9b0efb1 100644 --- a/src/core/hle/service/glue/time/static.cpp +++ b/src/core/hle/service/glue/time/static.cpp @@ -20,19 +20,6 @@ #include "core/hle/service/sm/sm.h" namespace Service::Glue::Time { -namespace { -template <typename T> -T GetSettingsItemValue(std::shared_ptr<Service::Set::ISystemSettingsServer>& set_sys, - const char* category, const char* name) { - std::vector<u8> interval_buf; - auto res = set_sys->GetSettingsItemValue(interval_buf, category, name); - ASSERT(res == ResultSuccess); - - T v{}; - std::memcpy(&v, interval_buf.data(), sizeof(T)); - return v; -} -} // namespace StaticService::StaticService(Core::System& system_, Service::PSC::Time::StaticServiceSetupInfo setup_info, @@ -181,8 +168,8 @@ Result StaticService::SetStandardUserSystemClockAutomaticCorrectionEnabled( Result StaticService::GetStandardUserSystemClockInitialYear(Out<s32> out_year) { SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_year={}", *out_year); }); - *out_year = GetSettingsItemValue<s32>(m_set_sys, "time", "standard_user_clock_initial_year"); - R_SUCCEED(); + R_RETURN(m_set_sys->GetSettingsItemValueImpl<s32>(*out_year, "time", + "standard_user_clock_initial_year")); } Result StaticService::IsStandardNetworkSystemClockAccuracySufficient(Out<bool> out_is_sufficient) { |