From a69f22e48a7c4e4fae7e1f6516fe29b55a333a09 Mon Sep 17 00:00:00 2001 From: JamePeng Date: Thu, 14 Apr 2016 23:51:13 +0800 Subject: [PATCH] Append a bool function PTM::GetShellState() --- src/core/hle/service/ptm/ptm.cpp | 4 ++++ src/core/hle/service/ptm/ptm.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/core/hle/service/ptm/ptm.cpp b/src/core/hle/service/ptm/ptm.cpp index e2c17d93b..f8677de14 100644 --- a/src/core/hle/service/ptm/ptm.cpp +++ b/src/core/hle/service/ptm/ptm.cpp @@ -44,6 +44,10 @@ void GetShellState(Service::Interface* self) { cmd_buff[2] = shell_open ? 1 : 0; } +bool GetShellState() { + return shell_open; +} + void GetBatteryLevel(Service::Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); diff --git a/src/core/hle/service/ptm/ptm.h b/src/core/hle/service/ptm/ptm.h index 7ef8877c7..28e6ea0b7 100644 --- a/src/core/hle/service/ptm/ptm.h +++ b/src/core/hle/service/ptm/ptm.h @@ -55,6 +55,9 @@ void GetAdapterState(Interface* self); */ void GetShellState(Interface* self); +// Return the 3DS's physical shell state +bool GetShellState(); + /** * PTM::GetBatteryLevel service function * Outputs: