From f0b6baf3adde14f9ccfc4660a6eaa412a81d644d Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 23 Jan 2018 22:02:14 -0500 Subject: time: Stub GetSystemClockContext function. --- src/core/hle/service/time/time.cpp | 12 ++++++++++-- src/core/hle/service/time/time.h | 7 +++++++ 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'src/core/hle/service/time') diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp index d6f3ae043..96ccee50d 100644 --- a/src/core/hle/service/time/time.cpp +++ b/src/core/hle/service/time/time.cpp @@ -19,7 +19,7 @@ public: ISystemClock() : ServiceFramework("ISystemClock") { static const FunctionInfo functions[] = { {0, &ISystemClock::GetCurrentTime, "GetCurrentTime"}, - }; + {2, &ISystemClock::GetSystemClockContext, "GetSystemClockContext"}}; RegisterHandlers(functions); } @@ -28,10 +28,18 @@ private: const s64 time_since_epoch{std::chrono::duration_cast( std::chrono::system_clock::now().time_since_epoch()) .count()}; + LOG_DEBUG(Service, "called"); IPC::ResponseBuilder rb{ctx, 4}; rb.Push(RESULT_SUCCESS); rb.Push(time_since_epoch); - LOG_DEBUG(Service, "called"); + } + + void GetSystemClockContext(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service, "(STUBBED) called"); + SystemClockContext system_clock_ontext{}; + IPC::ResponseBuilder rb{ctx, (sizeof(SystemClockContext) / 4) + 2}; + rb.Push(RESULT_SUCCESS); + rb.PushRaw(system_clock_ontext); } }; diff --git a/src/core/hle/service/time/time.h b/src/core/hle/service/time/time.h index 399f474d6..cd936a50c 100644 --- a/src/core/hle/service/time/time.h +++ b/src/core/hle/service/time/time.h @@ -33,6 +33,13 @@ struct CalendarAdditionalInfo { static_assert(sizeof(CalendarAdditionalInfo) == 0x18, "CalendarAdditionalInfo structure has incorrect size"); +// TODO(bunnei) RE this structure +struct SystemClockContext { + INSERT_PADDING_BYTES(0x20); +}; +static_assert(sizeof(SystemClockContext) == 0x20, + "SystemClockContext structure has incorrect size"); + class Module final { public: class Interface : public ServiceFramework { -- cgit v1.2.3