diff options
| author | 2014-12-03 09:58:52 -0500 | |
|---|---|---|
| committer | 2014-12-03 09:58:52 -0500 | |
| commit | e2e56c7bacc80434f0b8a6bdaaca478053f7a17b (patch) | |
| tree | 91fcd01ff7fc978ca4ee26e29dceb8f07c50a3c5 | |
| parent | Merge pull request #237 from vaguilar/fix-viewport (diff) | |
| parent | PTM_U: Implemented the GetShellState function. (diff) | |
| download | yuzu-e2e56c7bacc80434f0b8a6bdaaca478053f7a17b.tar.gz yuzu-e2e56c7bacc80434f0b8a6bdaaca478053f7a17b.tar.xz yuzu-e2e56c7bacc80434f0b8a6bdaaca478053f7a17b.zip | |
Merge pull request #219 from Subv/ptm
PTM_U: Implemented the GetShellState function.
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"}, |