summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2015-03-01 01:51:13 +0100
committerSubv <subv2112@gmail.com>2015-03-01 01:51:13 +0100
commitc36778e60216fcc8220ada2e6d2204c2f2aa87f1 (patch)
tree9b4917112e568add7f5c0d7ed94b28394035be06 /src
parentMerge pull request #599 from Subv/morton (diff)
downloadyuzu-c36778e60216fcc8220ada2e6d2204c2f2aa87f1.tar
yuzu-c36778e60216fcc8220ada2e6d2204c2f2aa87f1.tar.gz
yuzu-c36778e60216fcc8220ada2e6d2204c2f2aa87f1.tar.bz2
yuzu-c36778e60216fcc8220ada2e6d2204c2f2aa87f1.tar.lz
yuzu-c36778e60216fcc8220ada2e6d2204c2f2aa87f1.tar.xz
yuzu-c36778e60216fcc8220ada2e6d2204c2f2aa87f1.tar.zst
yuzu-c36778e60216fcc8220ada2e6d2204c2f2aa87f1.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/ptm_sysm.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/core/hle/service/ptm_sysm.cpp b/src/core/hle/service/ptm_sysm.cpp
index 96ef2dce0..dc4a9c569 100644
--- a/src/core/hle/service/ptm_sysm.cpp
+++ b/src/core/hle/service/ptm_sysm.cpp
@@ -12,6 +12,18 @@
namespace PTM_SYSM {
+/**
+ * Returns whether the system is powering off (?)
+ * Outputs:
+ * 1: Result code, 0 on success, otherwise error code
+ * 2: Whether the system is going through a power off
+ */
+void IsLegacyPowerOff(Service::Interface* self) {
+ u32* cmd_buff = Kernel::GetCommandBuffer();
+ cmd_buff[1] = RESULT_SUCCESS.raw;
+ cmd_buff[2] = 0;
+}
+
const Interface::FunctionInfo FunctionTable[] = {
{0x040100C0, nullptr, "SetRtcAlarmEx"},
{0x04020042, nullptr, "ReplySleepQuery"},
@@ -37,7 +49,7 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x080C0080, nullptr, "SetUserTime"},
{0x080D0000, nullptr, "InvalidateSystemTime"},
{0x080E0140, nullptr, "NotifyPlayEvent"},
- {0x080F0000, nullptr, "IsLegacyPowerOff"},
+ {0x080F0000, IsLegacyPowerOff, "IsLegacyPowerOff"},
{0x08100000, nullptr, "ClearLegacyPowerOff"},
{0x08110000, nullptr, "GetShellStatus"},
{0x08120000, nullptr, "IsShutdownByBatteryEmpty"},