diff options
| -rw-r--r-- | src/core/hle/service/ptm/ptm.cpp | 12 | ||||
| -rw-r--r-- | src/core/hle/service/ptm/ptm.h | 8 | ||||
| -rw-r--r-- | src/core/hle/service/ptm/ptm_u.cpp | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/src/core/hle/service/ptm/ptm.cpp b/src/core/hle/service/ptm/ptm.cpp index 2c7d49c9f..22c1093ff 100644 --- a/src/core/hle/service/ptm/ptm.cpp +++ b/src/core/hle/service/ptm/ptm.cpp | |||
| @@ -68,6 +68,18 @@ void GetBatteryChargeState(Service::Interface* self) { | |||
| 68 | LOG_WARNING(Service_PTM, "(STUBBED) called"); | 68 | LOG_WARNING(Service_PTM, "(STUBBED) called"); |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | void GetTotalStepCount(Service::Interface* self) { | ||
| 72 | u32* cmd_buff = Kernel::GetCommandBuffer(); | ||
| 73 | |||
| 74 | // TODO: This function is only a stub, | ||
| 75 | // it returns 0 as the total step count | ||
| 76 | |||
| 77 | cmd_buff[1] = RESULT_SUCCESS.raw; | ||
| 78 | cmd_buff[2] = 0; | ||
| 79 | |||
| 80 | LOG_WARNING(Service_PTM, "(STUBBED) called"); | ||
| 81 | } | ||
| 82 | |||
| 71 | void IsLegacyPowerOff(Service::Interface* self) { | 83 | void IsLegacyPowerOff(Service::Interface* self) { |
| 72 | u32* cmd_buff = Kernel::GetCommandBuffer(); | 84 | u32* cmd_buff = Kernel::GetCommandBuffer(); |
| 73 | 85 | ||
diff --git a/src/core/hle/service/ptm/ptm.h b/src/core/hle/service/ptm/ptm.h index b690003cb..f2e76441f 100644 --- a/src/core/hle/service/ptm/ptm.h +++ b/src/core/hle/service/ptm/ptm.h | |||
| @@ -72,6 +72,14 @@ void GetBatteryLevel(Interface* self); | |||
| 72 | void GetBatteryChargeState(Interface* self); | 72 | void GetBatteryChargeState(Interface* self); |
| 73 | 73 | ||
| 74 | /** | 74 | /** |
| 75 | * PTM::GetTotalStepCount service function | ||
| 76 | * Outputs: | ||
| 77 | * 1 : Result of function, 0 on success, otherwise error code | ||
| 78 | * 2 : Output of function, * = total step count | ||
| 79 | */ | ||
| 80 | void GetTotalStepCount(Interface* self); | ||
| 81 | |||
| 82 | /** | ||
| 75 | * PTM::IsLegacyPowerOff service function | 83 | * PTM::IsLegacyPowerOff service function |
| 76 | * Outputs: | 84 | * Outputs: |
| 77 | * 1: Result code, 0 on success, otherwise error code | 85 | * 1: Result code, 0 on success, otherwise error code |
diff --git a/src/core/hle/service/ptm/ptm_u.cpp b/src/core/hle/service/ptm/ptm_u.cpp index 3f5e9c7c1..09dc38c3e 100644 --- a/src/core/hle/service/ptm/ptm_u.cpp +++ b/src/core/hle/service/ptm/ptm_u.cpp | |||
| @@ -23,7 +23,7 @@ const Interface::FunctionInfo FunctionTable[] = { | |||
| 23 | {0x00090000, nullptr, "GetPedometerState"}, | 23 | {0x00090000, nullptr, "GetPedometerState"}, |
| 24 | {0x000A0042, nullptr, "GetStepHistoryEntry"}, | 24 | {0x000A0042, nullptr, "GetStepHistoryEntry"}, |
| 25 | {0x000B00C2, nullptr, "GetStepHistory"}, | 25 | {0x000B00C2, nullptr, "GetStepHistory"}, |
| 26 | {0x000C0000, nullptr, "GetTotalStepCount"}, | 26 | {0x000C0000, GetTotalStepCount, "GetTotalStepCount"}, |
| 27 | {0x000D0040, nullptr, "SetPedometerRecordingMode"}, | 27 | {0x000D0040, nullptr, "SetPedometerRecordingMode"}, |
| 28 | {0x000E0000, nullptr, "GetPedometerRecordingMode"}, | 28 | {0x000E0000, nullptr, "GetPedometerRecordingMode"}, |
| 29 | {0x000F0084, nullptr, "GetStepHistoryAll"}, | 29 | {0x000F0084, nullptr, "GetStepHistoryAll"}, |