Browse Source
Merge pull request #97 from bunnei/time-stub
time: Stub out GetTotalLocationNameCount and some cleanup.
pull/15/merge
bunnei
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
12 additions and
4 deletions
-
src/core/hle/service/time/time.cpp
-
src/core/hle/service/time/time.h
|
|
|
@ -45,6 +45,7 @@ public: |
|
|
|
ITimeZoneService() : ServiceFramework("ITimeZoneService") { |
|
|
|
static const FunctionInfo functions[] = { |
|
|
|
{0, &ITimeZoneService::GetDeviceLocationName, "GetDeviceLocationName"}, |
|
|
|
{2, &ITimeZoneService::GetTotalLocationNameCount, "GetTotalLocationNameCount"}, |
|
|
|
{101, &ITimeZoneService::ToCalendarTimeWithMyRule, "ToCalendarTimeWithMyRule"}, |
|
|
|
}; |
|
|
|
RegisterHandlers(functions); |
|
|
|
@ -53,10 +54,17 @@ public: |
|
|
|
private: |
|
|
|
void GetDeviceLocationName(Kernel::HLERequestContext& ctx) { |
|
|
|
LOG_WARNING(Service, "(STUBBED) called"); |
|
|
|
LocationName name{}; |
|
|
|
IPC::RequestBuilder rb{ctx, 11}; |
|
|
|
LocationName location_name{}; |
|
|
|
IPC::RequestBuilder rb{ctx, (sizeof(LocationName) / 4) + 2}; |
|
|
|
rb.Push(RESULT_SUCCESS); |
|
|
|
rb.PushRaw(name); |
|
|
|
rb.PushRaw(location_name); |
|
|
|
} |
|
|
|
|
|
|
|
void GetTotalLocationNameCount(Kernel::HLERequestContext& ctx) { |
|
|
|
LOG_WARNING(Service, "(STUBBED) called"); |
|
|
|
IPC::RequestBuilder rb{ctx, 3}; |
|
|
|
rb.Push(RESULT_SUCCESS); |
|
|
|
rb.Push<u32>(0); |
|
|
|
} |
|
|
|
|
|
|
|
void ToCalendarTimeWithMyRule(Kernel::HLERequestContext& ctx) { |
|
|
|
|
|
|
|
@ -13,7 +13,7 @@ namespace Time { |
|
|
|
struct LocationName { |
|
|
|
INSERT_PADDING_BYTES(0x24); |
|
|
|
}; |
|
|
|
static_assert(sizeof(LocationName) == 0x24, "LocationName structure has incorrect size"); |
|
|
|
static_assert(sizeof(LocationName) == 0x24, "LocationName is incorrect size"); |
|
|
|
|
|
|
|
struct CalendarTime { |
|
|
|
u16_le year; |
|
|
|
|