summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Subv2014-11-23 11:06:54 -0500
committerGravatar Subv2014-11-30 19:50:14 -0500
commit4cdaac44d300531eaffa29cb826183aaf905ee6f (patch)
treee3cd1c3a2dfc9598b430d983fd8da52e3387c5d5
parentMerge pull request #190 from purpasmart96/more_services (diff)
downloadyuzu-4cdaac44d300531eaffa29cb826183aaf905ee6f.tar.gz
yuzu-4cdaac44d300531eaffa29cb826183aaf905ee6f.tar.xz
yuzu-4cdaac44d300531eaffa29cb826183aaf905ee6f.zip
PTM_U: Implemented the GetShellState function.
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/ptm_u.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/core/hle/service/ptm_u.cpp b/src/core/hle/service/ptm_u.cpp
index d9122dbbc..1ce32ee4a 100644
--- a/src/core/hle/service/ptm_u.cpp
+++ b/src/core/hle/service/ptm_u.cpp
@@ -11,13 +11,30 @@
11 11
12namespace PTM_U { 12namespace PTM_U {
13 13
14static bool shell_open = true;
15
16/*
17 * PTM_User::GetShellState service function.
18 * Outputs:
19 * 1 : Result of function, 0 on success, otherwise error code
20 * 2 : Whether the 3DS's physical shell casing is open (1) or closed (0)
21 */
22static void GetShellState(Service::Interface* self) {
23 u32* cmd_buff = Service::GetCommandBuffer();
24
25 cmd_buff[1] = 0;
26 cmd_buff[2] = shell_open ? 1 : 0;
27
28 DEBUG_LOG(KERNEL, "PTM_U::GetShellState called");
29}
30
14const Interface::FunctionInfo FunctionTable[] = { 31const Interface::FunctionInfo FunctionTable[] = {
15 {0x00010002, nullptr, "RegisterAlarmClient"}, 32 {0x00010002, nullptr, "RegisterAlarmClient"},
16 {0x00020080, nullptr, "SetRtcAlarm"}, 33 {0x00020080, nullptr, "SetRtcAlarm"},
17 {0x00030000, nullptr, "GetRtcAlarm"}, 34 {0x00030000, nullptr, "GetRtcAlarm"},
18 {0x00040000, nullptr, "CancelRtcAlarm"}, 35 {0x00040000, nullptr, "CancelRtcAlarm"},
19 {0x00050000, nullptr, "GetAdapterState"}, 36 {0x00050000, nullptr, "GetAdapterState"},
20 {0x00060000, nullptr, "GetShellState"}, 37 {0x00060000, GetShellState, "GetShellState"},
21 {0x00070000, nullptr, "GetBatteryLevel"}, 38 {0x00070000, nullptr, "GetBatteryLevel"},
22 {0x00080000, nullptr, "GetBatteryChargeState"}, 39 {0x00080000, nullptr, "GetBatteryChargeState"},
23 {0x00090000, nullptr, "GetPedometerState"}, 40 {0x00090000, nullptr, "GetPedometerState"},