From d1c1fa214c76bab7d5a8afbfcfa0d35669eaf0a0 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Thu, 9 Jul 2020 20:18:54 +0100 Subject: [PATCH] Stub (un)lockExit in ISelfController --- .../skyline/services/am/controller/ISelfController.cpp | 6 ++++++ .../skyline/services/am/controller/ISelfController.h | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/app/src/main/cpp/skyline/services/am/controller/ISelfController.cpp b/app/src/main/cpp/skyline/services/am/controller/ISelfController.cpp index c4087716..6dd5346f 100644 --- a/app/src/main/cpp/skyline/services/am/controller/ISelfController.cpp +++ b/app/src/main/cpp/skyline/services/am/controller/ISelfController.cpp @@ -8,6 +8,8 @@ namespace skyline::service::am { ISelfController::ISelfController(const DeviceState &state, ServiceManager &manager) : libraryAppletLaunchableEvent(std::make_shared(state)), BaseService(state, manager, Service::am_ISelfController, "am:ISelfController", { + {0x1, SFUNC(ISelfController::LockExit)}, + {0x2, SFUNC(ISelfController::UnlockExit)}, {0x9, SFUNC(ISelfController::GetLibraryAppletLaunchableEvent)}, {0xB, SFUNC(ISelfController::SetOperationModeChangedNotification)}, {0xC, SFUNC(ISelfController::SetPerformanceModeChangedNotification)}, @@ -17,6 +19,10 @@ namespace skyline::service::am { {0x28, SFUNC(ISelfController::CreateManagedDisplayLayer)} }) {} + void ISelfController::LockExit(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {} + + void ISelfController::UnlockExit(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {} + void ISelfController::GetLibraryAppletLaunchableEvent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { libraryAppletLaunchableEvent->Signal(); diff --git a/app/src/main/cpp/skyline/services/am/controller/ISelfController.h b/app/src/main/cpp/skyline/services/am/controller/ISelfController.h index 8225dff3..3177c653 100644 --- a/app/src/main/cpp/skyline/services/am/controller/ISelfController.h +++ b/app/src/main/cpp/skyline/services/am/controller/ISelfController.h @@ -17,6 +17,16 @@ namespace skyline::service::am { public: ISelfController(const DeviceState &state, ServiceManager &manager); + /** + * @brief This function prevents the running application from being quit via the home button (https://switchbrew.org/wiki/Applet_Manager_services#LockExit) + */ + void LockExit(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + + /** + * @brief This function allows the running application to be quit via the home button (https://switchbrew.org/wiki/Applet_Manager_services#UnlockExit) + */ + void UnlockExit(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** * @brief This function obtains a handle to the library applet launchable event (https://switchbrew.org/wiki/Applet_Manager_services#GetLibraryAppletLaunchableEvent) */