diff options
| author | Andrew Pilley <anpilley@users.noreply.github.com> | 2024-02-17 23:36:43 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-17 23:36:43 +1100 |
| commit | e2e0916100c20ad9f67e609d2d6cd33495b855f1 (patch) | |
| tree | 4d24b9d8d9e9722c0808c0cb259f7afd236bc1f6 /src/core/hle/service/glue/time/static.cpp | |
| parent | 501e3ae05abbb6ae1cb8811113e1c889d33e5858 (diff) | |
| parent | c7588c042ba14bce871d12f5cf4dbf64bb5b3fe9 (diff) | |
Merge branch 'yuzu-emu:master' into import-firmware
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) { |
