diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/time/time.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/time/time.h | 12 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp index 60b201d06..128329284 100644 --- a/src/core/hle/service/time/time.cpp +++ b/src/core/hle/service/time/time.cpp | |||
| @@ -264,7 +264,7 @@ void Module::Interface::GetClockSnapshot(Kernel::HLERequestContext& ctx) { | |||
| 264 | LOG_DEBUG(Service_Time, "called"); | 264 | LOG_DEBUG(Service_Time, "called"); |
| 265 | 265 | ||
| 266 | IPC::RequestParser rp{ctx}; | 266 | IPC::RequestParser rp{ctx}; |
| 267 | auto unknown_u8 = rp.PopRaw<u8>(); | 267 | const auto initial_type = rp.PopRaw<u8>(); |
| 268 | 268 | ||
| 269 | ClockSnapshot clock_snapshot{}; | 269 | ClockSnapshot clock_snapshot{}; |
| 270 | 270 | ||
| @@ -304,7 +304,7 @@ void Module::Interface::GetClockSnapshot(Kernel::HLERequestContext& ctx) { | |||
| 304 | clock_snapshot.steady_clock_timepoint = steady_clock_time_point; | 304 | clock_snapshot.steady_clock_timepoint = steady_clock_time_point; |
| 305 | clock_snapshot.location_name = location_name; | 305 | clock_snapshot.location_name = location_name; |
| 306 | clock_snapshot.clock_auto_adjustment_enabled = 1; | 306 | clock_snapshot.clock_auto_adjustment_enabled = 1; |
| 307 | clock_snapshot.ipc_u8 = unknown_u8; | 307 | clock_snapshot.type = initial_type; |
| 308 | IPC::ResponseBuilder rb{ctx, 2}; | 308 | IPC::ResponseBuilder rb{ctx, 2}; |
| 309 | rb.Push(RESULT_SUCCESS); | 309 | rb.Push(RESULT_SUCCESS); |
| 310 | ctx.WriteBuffer(&clock_snapshot, sizeof(ClockSnapshot)); | 310 | ctx.WriteBuffer(&clock_snapshot, sizeof(ClockSnapshot)); |
diff --git a/src/core/hle/service/time/time.h b/src/core/hle/service/time/time.h index ea43fbea7..f11affe95 100644 --- a/src/core/hle/service/time/time.h +++ b/src/core/hle/service/time/time.h | |||
| @@ -22,7 +22,6 @@ struct CalendarTime { | |||
| 22 | u8 hour; | 22 | u8 hour; |
| 23 | u8 minute; | 23 | u8 minute; |
| 24 | u8 second; | 24 | u8 second; |
| 25 | INSERT_PADDING_BYTES(1); | ||
| 26 | }; | 25 | }; |
| 27 | static_assert(sizeof(CalendarTime) == 0x8, "CalendarTime structure has incorrect size"); | 26 | static_assert(sizeof(CalendarTime) == 0x8, "CalendarTime structure has incorrect size"); |
| 28 | 27 | ||
| @@ -30,7 +29,7 @@ struct CalendarAdditionalInfo { | |||
| 30 | u32_le day_of_week; | 29 | u32_le day_of_week; |
| 31 | u32_le day_of_year; | 30 | u32_le day_of_year; |
| 32 | std::array<u8, 8> name; | 31 | std::array<u8, 8> name; |
| 33 | INSERT_PADDING_BYTES(1); | 32 | u8 is_dst; |
| 34 | s32_le utc_offset; | 33 | s32_le utc_offset; |
| 35 | }; | 34 | }; |
| 36 | static_assert(sizeof(CalendarAdditionalInfo) == 0x18, | 35 | static_assert(sizeof(CalendarAdditionalInfo) == 0x18, |
| @@ -42,8 +41,10 @@ struct TimeZoneRule { | |||
| 42 | }; | 41 | }; |
| 43 | 42 | ||
| 44 | struct SteadyClockTimePoint { | 43 | struct SteadyClockTimePoint { |
| 44 | using SourceID = std::array<u8, 16>; | ||
| 45 | |||
| 45 | u64_le value; | 46 | u64_le value; |
| 46 | INSERT_PADDING_WORDS(4); | 47 | SourceID source_id; |
| 47 | }; | 48 | }; |
| 48 | static_assert(sizeof(SteadyClockTimePoint) == 0x18, "SteadyClockTimePoint is incorrect size"); | 49 | static_assert(sizeof(SteadyClockTimePoint) == 0x18, "SteadyClockTimePoint is incorrect size"); |
| 49 | 50 | ||
| @@ -66,8 +67,9 @@ struct ClockSnapshot { | |||
| 66 | SteadyClockTimePoint steady_clock_timepoint; | 67 | SteadyClockTimePoint steady_clock_timepoint; |
| 67 | LocationName location_name; | 68 | LocationName location_name; |
| 68 | u8 clock_auto_adjustment_enabled; | 69 | u8 clock_auto_adjustment_enabled; |
| 69 | u8 ipc_u8; | 70 | u8 type; |
| 70 | INSERT_PADDING_BYTES(2); | 71 | u8 version; |
| 72 | INSERT_PADDING_BYTES(1); | ||
| 71 | }; | 73 | }; |
| 72 | static_assert(sizeof(ClockSnapshot) == 0xd0, "ClockSnapshot is an invalid size"); | 74 | static_assert(sizeof(ClockSnapshot) == 0xd0, "ClockSnapshot is an invalid size"); |
| 73 | 75 | ||