summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-10-27 21:07:43 +0100
committerbunnei <bunneidev@gmail.com>2015-10-27 21:07:43 +0100
commit7e18bcf6e0d429d9aeb23ec85acc762023d359d4 (patch)
tree28d97fa0c2607099444e3b1f8f7bd6d0e3d8f1dd /src/core
parentMerge pull request #1209 from wwylele/file-path-encoding (diff)
parentFix copy paste (diff)
downloadyuzu-7e18bcf6e0d429d9aeb23ec85acc762023d359d4.tar
yuzu-7e18bcf6e0d429d9aeb23ec85acc762023d359d4.tar.gz
yuzu-7e18bcf6e0d429d9aeb23ec85acc762023d359d4.tar.bz2
yuzu-7e18bcf6e0d429d9aeb23ec85acc762023d359d4.tar.lz
yuzu-7e18bcf6e0d429d9aeb23ec85acc762023d359d4.tar.xz
yuzu-7e18bcf6e0d429d9aeb23ec85acc762023d359d4.tar.zst
yuzu-7e18bcf6e0d429d9aeb23ec85acc762023d359d4.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/ptm/ptm.cpp12
-rw-r--r--src/core/hle/service/ptm/ptm.h8
-rw-r--r--src/core/hle/service/ptm/ptm_u.cpp2
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) {
LOG_WARNING(Service_PTM, "(STUBBED) called");
}
+void GetTotalStepCount(Service::Interface* self) {
+ u32* cmd_buff = Kernel::GetCommandBuffer();
+
+ // TODO: This function is only a stub,
+ // it returns 0 as the total step count
+
+ cmd_buff[1] = RESULT_SUCCESS.raw;
+ cmd_buff[2] = 0;
+
+ LOG_WARNING(Service_PTM, "(STUBBED) called");
+}
+
void IsLegacyPowerOff(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
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);
void GetBatteryChargeState(Interface* self);
/**
+ * PTM::GetTotalStepCount service function
+ * Outputs:
+ * 1 : Result of function, 0 on success, otherwise error code
+ * 2 : Output of function, * = total step count
+ */
+void GetTotalStepCount(Interface* self);
+
+/**
* PTM::IsLegacyPowerOff service function
* Outputs:
* 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[] = {
{0x00090000, nullptr, "GetPedometerState"},
{0x000A0042, nullptr, "GetStepHistoryEntry"},
{0x000B00C2, nullptr, "GetStepHistory"},
- {0x000C0000, nullptr, "GetTotalStepCount"},
+ {0x000C0000, GetTotalStepCount, "GetTotalStepCount"},
{0x000D0040, nullptr, "SetPedometerRecordingMode"},
{0x000E0000, nullptr, "GetPedometerRecordingMode"},
{0x000F0084, nullptr, "GetStepHistoryAll"},