VERY experimental Nintendo Switch 2 emulator
C++
service: Add common ptm:u commands to other ptm services
Lioncash9becdeada95e
diff --git a/src/core/hle/service/ptm/ptm_gets.cpp b/src/core/hle/service/ptm/ptm_gets.cppindex adf11da470..b23e508d6e 100644--- a/src/core/hle/service/ptm/ptm_gets.cpp+++ b/src/core/hle/service/ptm/ptm_gets.cpp@@ -2,12 +2,30 @@// Licensed under GPLv2 or any later version// Refer to the license.txt file included.+#include "core/hle/service/ptm/ptm.h"#include "core/hle/service/ptm/ptm_gets.h"namespace Service {namespace PTM {const Interface::FunctionInfo FunctionTable[] = {+ // ptm:u common commands+ {0x00010002, nullptr, "RegisterAlarmClient"},+ {0x00020080, nullptr, "SetRtcAlarm"},+ {0x00030000, nullptr, "GetRtcAlarm"},+ {0x00040000, nullptr, "CancelRtcAlarm"},+ {0x00050000, GetAdapterState, "GetAdapterState"},+ {0x00060000, GetShellState, "GetShellState"},+ {0x00070000, GetBatteryLevel, "GetBatteryLevel"},+ {0x00080000, GetBatteryChargeState, "GetBatteryChargeState"},+ {0x00090000, nullptr, "GetPedometerState"},+ {0x000A0042, nullptr, "GetStepHistoryEntry"},+ {0x000B00C2, nullptr, "GetStepHistory"},+ {0x000C0000, GetTotalStepCount, "GetTotalStepCount"},+ {0x000D0040, nullptr, "SetPedometerRecordingMode"},+ {0x000E0000, nullptr, "GetPedometerRecordingMode"},+ {0x000F0084, nullptr, "GetStepHistoryAll"},+ // ptm:gets{0x04010000, nullptr, "GetSystemTime"},};diff --git a/src/core/hle/service/ptm/ptm_play.cpp b/src/core/hle/service/ptm/ptm_play.cppindex 3fb7e14cae..bcb00e0d43 100644--- a/src/core/hle/service/ptm/ptm_play.cpp+++ b/src/core/hle/service/ptm/ptm_play.cpp@@ -2,12 +2,30 @@// Licensed under GPLv2 or any later version// Refer to the license.txt file included.+#include "core/hle/service/ptm/ptm.h"#include "core/hle/service/ptm/ptm_play.h"namespace Service {namespace PTM {const Interface::FunctionInfo FunctionTable[] = {+ // ptm:u common commands+ {0x00010002, nullptr, "RegisterAlarmClient"},+ {0x00020080, nullptr, "SetRtcAlarm"},+ {0x00030000, nullptr, "GetRtcAlarm"},+ {0x00040000, nullptr, "CancelRtcAlarm"},+ {0x00050000, GetAdapterState, "GetAdapterState"},+ {0x00060000, GetShellState, "GetShellState"},+ {0x00070000, GetBatteryLevel, "GetBatteryLevel"},+ {0x00080000, GetBatteryChargeState, "GetBatteryChargeState"},+ {0x00090000, nullptr, "GetPedometerState"},+ {0x000A0042, nullptr, "GetStepHistoryEntry"},+ {0x000B00C2, nullptr, "GetStepHistory"},+ {0x000C0000, GetTotalStepCount, "GetTotalStepCount"},+ {0x000D0040, nullptr, "SetPedometerRecordingMode"},+ {0x000E0000, nullptr, "GetPedometerRecordingMode"},+ {0x000F0084, nullptr, "GetStepHistoryAll"},+ // ptm:play{0x08070082, nullptr, "GetPlayHistory"},{0x08080000, nullptr, "GetPlayHistoryStart"},{0x08090000, nullptr, "GetPlayHistoryLength"},diff --git a/src/core/hle/service/ptm/ptm_sets.cpp b/src/core/hle/service/ptm/ptm_sets.cppindex 85823f0017..a8c6cf2273 100644--- a/src/core/hle/service/ptm/ptm_sets.cpp+++ b/src/core/hle/service/ptm/ptm_sets.cpp@@ -8,6 +8,7 @@ namespace Service {namespace PTM {const Interface::FunctionInfo FunctionTable[] = {+ // Note that this service does not have access to ptm:u's common commands{0x00010080, nullptr, "SetSystemTime"},};diff --git a/src/core/hle/service/ptm/ptm_sysm.cpp b/src/core/hle/service/ptm/ptm_sysm.cppindex f6d8c0c827..a5db93e444 100644--- a/src/core/hle/service/ptm/ptm_sysm.cpp+++ b/src/core/hle/service/ptm/ptm_sysm.cpp@@ -9,6 +9,23 @@ namespace Service {namespace PTM {const Interface::FunctionInfo FunctionTable[] = {+ // ptm:u common commands+ {0x00010002, nullptr, "RegisterAlarmClient"},+ {0x00020080, nullptr, "SetRtcAlarm"},+ {0x00030000, nullptr, "GetRtcAlarm"},+ {0x00040000, nullptr, "CancelRtcAlarm"},+ {0x00050000, GetAdapterState, "GetAdapterState"},+ {0x00060000, GetShellState, "GetShellState"},+ {0x00070000, GetBatteryLevel, "GetBatteryLevel"},+ {0x00080000, GetBatteryChargeState, "GetBatteryChargeState"},+ {0x00090000, nullptr, "GetPedometerState"},+ {0x000A0042, nullptr, "GetStepHistoryEntry"},+ {0x000B00C2, nullptr, "GetStepHistory"},+ {0x000C0000, GetTotalStepCount, "GetTotalStepCount"},+ {0x000D0040, nullptr, "SetPedometerRecordingMode"},+ {0x000E0000, nullptr, "GetPedometerRecordingMode"},+ {0x000F0084, nullptr, "GetStepHistoryAll"},+ // ptm:sysm{0x040100C0, nullptr, "SetRtcAlarmEx"},{0x04020042, nullptr, "ReplySleepQuery"},{0x04030042, nullptr, "NotifySleepPreparationComplete"},