mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-15 15:25:31 +00:00
time: Stub GetSystemClockContext function.
This commit is contained in:
parent
7588b24f46
commit
f0b6baf3ad
|
@ -19,7 +19,7 @@ public:
|
||||||
ISystemClock() : ServiceFramework("ISystemClock") {
|
ISystemClock() : ServiceFramework("ISystemClock") {
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &ISystemClock::GetCurrentTime, "GetCurrentTime"},
|
{0, &ISystemClock::GetCurrentTime, "GetCurrentTime"},
|
||||||
};
|
{2, &ISystemClock::GetSystemClockContext, "GetSystemClockContext"}};
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,10 +28,18 @@ private:
|
||||||
const s64 time_since_epoch{std::chrono::duration_cast<std::chrono::seconds>(
|
const s64 time_since_epoch{std::chrono::duration_cast<std::chrono::seconds>(
|
||||||
std::chrono::system_clock::now().time_since_epoch())
|
std::chrono::system_clock::now().time_since_epoch())
|
||||||
.count()};
|
.count()};
|
||||||
|
LOG_DEBUG(Service, "called");
|
||||||
IPC::ResponseBuilder rb{ctx, 4};
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.Push<u64>(time_since_epoch);
|
rb.Push<u64>(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);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,13 @@ struct CalendarAdditionalInfo {
|
||||||
static_assert(sizeof(CalendarAdditionalInfo) == 0x18,
|
static_assert(sizeof(CalendarAdditionalInfo) == 0x18,
|
||||||
"CalendarAdditionalInfo structure has incorrect size");
|
"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 {
|
class Module final {
|
||||||
public:
|
public:
|
||||||
class Interface : public ServiceFramework<Interface> {
|
class Interface : public ServiceFramework<Interface> {
|
||||||
|
|
Loading…
Reference in a new issue