diff options
| author | 2018-01-23 22:02:14 -0500 | |
|---|---|---|
| committer | 2018-01-24 22:24:18 -0500 | |
| commit | f0b6baf3adde14f9ccfc4660a6eaa412a81d644d (patch) | |
| tree | 303f1a73d07c3627902f9d6bc172a4028ffeefaf /src | |
| parent | server_session: Fix scenario where all domain handlers are closed. (diff) | |
| download | yuzu-f0b6baf3adde14f9ccfc4660a6eaa412a81d644d.tar.gz yuzu-f0b6baf3adde14f9ccfc4660a6eaa412a81d644d.tar.xz yuzu-f0b6baf3adde14f9ccfc4660a6eaa412a81d644d.zip | |
time: Stub GetSystemClockContext function.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/time/time.cpp | 12 | ||||
| -rw-r--r-- | src/core/hle/service/time/time.h | 7 |
2 files changed, 17 insertions, 2 deletions
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: | |||
| 19 | ISystemClock() : ServiceFramework("ISystemClock") { | 19 | ISystemClock() : ServiceFramework("ISystemClock") { |
| 20 | static const FunctionInfo functions[] = { | 20 | static const FunctionInfo functions[] = { |
| 21 | {0, &ISystemClock::GetCurrentTime, "GetCurrentTime"}, | 21 | {0, &ISystemClock::GetCurrentTime, "GetCurrentTime"}, |
| 22 | }; | 22 | {2, &ISystemClock::GetSystemClockContext, "GetSystemClockContext"}}; |
| 23 | RegisterHandlers(functions); | 23 | RegisterHandlers(functions); |
| 24 | } | 24 | } |
| 25 | 25 | ||
| @@ -28,10 +28,18 @@ private: | |||
| 28 | const s64 time_since_epoch{std::chrono::duration_cast<std::chrono::seconds>( | 28 | const s64 time_since_epoch{std::chrono::duration_cast<std::chrono::seconds>( |
| 29 | std::chrono::system_clock::now().time_since_epoch()) | 29 | std::chrono::system_clock::now().time_since_epoch()) |
| 30 | .count()}; | 30 | .count()}; |
| 31 | LOG_DEBUG(Service, "called"); | ||
| 31 | IPC::ResponseBuilder rb{ctx, 4}; | 32 | IPC::ResponseBuilder rb{ctx, 4}; |
| 32 | rb.Push(RESULT_SUCCESS); | 33 | rb.Push(RESULT_SUCCESS); |
| 33 | rb.Push<u64>(time_since_epoch); | 34 | rb.Push<u64>(time_since_epoch); |
| 34 | LOG_DEBUG(Service, "called"); | 35 | } |
| 36 | |||
| 37 | void GetSystemClockContext(Kernel::HLERequestContext& ctx) { | ||
| 38 | LOG_WARNING(Service, "(STUBBED) called"); | ||
| 39 | SystemClockContext system_clock_ontext{}; | ||
| 40 | IPC::ResponseBuilder rb{ctx, (sizeof(SystemClockContext) / 4) + 2}; | ||
| 41 | rb.Push(RESULT_SUCCESS); | ||
| 42 | rb.PushRaw(system_clock_ontext); | ||
| 35 | } | 43 | } |
| 36 | }; | 44 | }; |
| 37 | 45 | ||
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 { | |||
| 33 | static_assert(sizeof(CalendarAdditionalInfo) == 0x18, | 33 | static_assert(sizeof(CalendarAdditionalInfo) == 0x18, |
| 34 | "CalendarAdditionalInfo structure has incorrect size"); | 34 | "CalendarAdditionalInfo structure has incorrect size"); |
| 35 | 35 | ||
| 36 | // TODO(bunnei) RE this structure | ||
| 37 | struct SystemClockContext { | ||
| 38 | INSERT_PADDING_BYTES(0x20); | ||
| 39 | }; | ||
| 40 | static_assert(sizeof(SystemClockContext) == 0x20, | ||
| 41 | "SystemClockContext structure has incorrect size"); | ||
| 42 | |||
| 36 | class Module final { | 43 | class Module final { |
| 37 | public: | 44 | public: |
| 38 | class Interface : public ServiceFramework<Interface> { | 45 | class Interface : public ServiceFramework<Interface> { |