diff options
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/ptm_u.cpp | 19 |
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 | ||
| 12 | namespace PTM_U { | 12 | namespace PTM_U { |
| 13 | 13 | ||
| 14 | static 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 | */ | ||
| 22 | static 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 | |||
| 14 | const Interface::FunctionInfo FunctionTable[] = { | 31 | const 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"}, |