summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2018-01-23 22:02:14 -0500
committerGravatar bunnei2018-01-24 22:24:18 -0500
commitf0b6baf3adde14f9ccfc4660a6eaa412a81d644d (patch)
tree303f1a73d07c3627902f9d6bc172a4028ffeefaf /src
parentserver_session: Fix scenario where all domain handlers are closed. (diff)
downloadyuzu-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.cpp12
-rw-r--r--src/core/hle/service/time/time.h7
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 {
33static_assert(sizeof(CalendarAdditionalInfo) == 0x18, 33static_assert(sizeof(CalendarAdditionalInfo) == 0x18,
34 "CalendarAdditionalInfo structure has incorrect size"); 34 "CalendarAdditionalInfo structure has incorrect size");
35 35
36// TODO(bunnei) RE this structure
37struct SystemClockContext {
38 INSERT_PADDING_BYTES(0x20);
39};
40static_assert(sizeof(SystemClockContext) == 0x20,
41 "SystemClockContext structure has incorrect size");
42
36class Module final { 43class Module final {
37public: 44public:
38 class Interface : public ServiceFramework<Interface> { 45 class Interface : public ServiceFramework<Interface> {