From da410506a401abc853ee23e56ca1e25eb47cd6e6 Mon Sep 17 00:00:00 2001 From: Kelebek1 Date: Fri, 26 Jan 2024 15:29:04 +0000 Subject: Move time services to new IPC. Add some fixes/improvements to usage with the new IPC --- src/core/hle/service/nfc/common/device.cpp | 8 ++++---- src/core/hle/service/nfc/common/device_manager.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/core/hle/service/nfc/common') diff --git a/src/core/hle/service/nfc/common/device.cpp b/src/core/hle/service/nfc/common/device.cpp index 1e2d2d212..28e3000bd 100644 --- a/src/core/hle/service/nfc/common/device.cpp +++ b/src/core/hle/service/nfc/common/device.cpp @@ -1405,7 +1405,7 @@ NFP::AmiiboDate NfcDevice::GetAmiiboDate(s64 posix_time) const { system.ServiceManager().GetService("time:u", true); std::shared_ptr timezone_service{}; - static_service->GetTimeZoneService(timezone_service); + static_service->GetTimeZoneService(&timezone_service); Service::PSC::Time::CalendarTime calendar_time{}; Service::PSC::Time::CalendarAdditionalInfo additional_info{}; @@ -1416,7 +1416,7 @@ NFP::AmiiboDate NfcDevice::GetAmiiboDate(s64 posix_time) const { amiibo_date.SetMonth(1); amiibo_date.SetDay(1); - if (timezone_service->ToCalendarTimeWithMyRule(calendar_time, additional_info, posix_time) == + if (timezone_service->ToCalendarTimeWithMyRule(&calendar_time, &additional_info, posix_time) == ResultSuccess) { amiibo_date.SetYear(calendar_time.year); amiibo_date.SetMonth(calendar_time.month); @@ -1431,10 +1431,10 @@ s64 NfcDevice::GetCurrentPosixTime() const { system.ServiceManager().GetService("time:u", true); std::shared_ptr steady_clock{}; - static_service->GetStandardSteadyClock(steady_clock); + static_service->GetStandardSteadyClock(&steady_clock); Service::PSC::Time::SteadyClockTimePoint time_point{}; - R_ASSERT(steady_clock->GetCurrentTimePoint(time_point)); + R_ASSERT(steady_clock->GetCurrentTimePoint(&time_point)); return time_point.time_point; } diff --git a/src/core/hle/service/nfc/common/device_manager.cpp b/src/core/hle/service/nfc/common/device_manager.cpp index b60699c45..94a8243b5 100644 --- a/src/core/hle/service/nfc/common/device_manager.cpp +++ b/src/core/hle/service/nfc/common/device_manager.cpp @@ -91,10 +91,10 @@ Result DeviceManager::ListDevices(std::vector& nfp_devices, std::size_t max true); std::shared_ptr steady_clock{}; - static_service->GetStandardSteadyClock(steady_clock); + static_service->GetStandardSteadyClock(&steady_clock); Service::PSC::Time::SteadyClockTimePoint time_point{}; - R_ASSERT(steady_clock->GetCurrentTimePoint(time_point)); + R_ASSERT(steady_clock->GetCurrentTimePoint(&time_point)); const s64 elapsed_time = time_point.time_point - time_since_last_error; if (time_since_last_error != 0 && elapsed_time < MinimumRecoveryTime) { @@ -754,10 +754,10 @@ Result DeviceManager::VerifyDeviceResult(std::shared_ptr device, system.ServiceManager().GetService("time:u", true); std::shared_ptr steady_clock{}; - static_service->GetStandardSteadyClock(steady_clock); + static_service->GetStandardSteadyClock(&steady_clock); Service::PSC::Time::SteadyClockTimePoint time_point{}; - R_ASSERT(steady_clock->GetCurrentTimePoint(time_point)); + R_ASSERT(steady_clock->GetCurrentTimePoint(&time_point)); time_since_last_error = time_point.time_point; } -- cgit v1.2.3