From dcd9e4ff61d4dfcc733c6431e3d83fd2e120e63e Mon Sep 17 00:00:00 2001 From: Dima Date: Sat, 12 Nov 2022 13:18:24 +0300 Subject: [PATCH] Stub SetIdleTimeDetectionExtension, SetAlbumImageTakenNotificationEnabled --- .../services/am/controller/ISelfController.cpp | 12 ++++++++++++ .../services/am/controller/ISelfController.h | 14 +++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) 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 92196a61..4f0389f9 100644 --- a/app/src/main/cpp/skyline/services/am/controller/ISelfController.cpp +++ b/app/src/main/cpp/skyline/services/am/controller/ISelfController.cpp @@ -70,6 +70,12 @@ namespace skyline::service::am { return {}; } + Result ISelfController::SetIdleTimeDetectionExtension(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + auto idleTimeDetectionExtension{request.Pop()}; + Logger::Debug("Setting Idle Time Detection Extension: 0x{:X}", idleTimeDetectionExtension); + return {}; + } + Result ISelfController::GetAccumulatedSuspendedTickValue(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { // TODO: Properly handle this after we implement game suspending response.Push(0); @@ -83,4 +89,10 @@ namespace skyline::service::am { response.copyHandles.push_back(handle); return {}; } + + Result ISelfController::SetAlbumImageTakenNotificationEnabled(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + auto albumImageTakenNotificationEnabled{request.Pop()};; + Logger::Debug("Setting Album Image Taken Notification Enabled: {}", albumImageTakenNotificationEnabled); + return {}; + } } 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 2e6c3436..22360f1c 100644 --- a/app/src/main/cpp/skyline/services/am/controller/ISelfController.h +++ b/app/src/main/cpp/skyline/services/am/controller/ISelfController.h @@ -93,6 +93,11 @@ namespace skyline::service::am { */ Result CreateManagedDisplayLayer(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** + * @url https://switchbrew.org/wiki/Applet_Manager_services#SetIdleTimeDetectionExtension + */ + Result SetIdleTimeDetectionExtension(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** * @brief Returns how long the process was suspended for in ticks * @url https://switchbrew.org/wiki/Applet_Manager_services#GetAccumulatedSuspendedTickValue @@ -105,6 +110,11 @@ namespace skyline::service::am { */ Result GetAccumulatedSuspendedTickChangedEvent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** + * @url https://switchbrew.org/wiki/Applet_Manager_services#SetAlbumImageTakenNotificationEnabled + */ + Result SetAlbumImageTakenNotificationEnabled(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + SERVICE_DECL( SFUNC(0x0, ISelfController, Exit), SFUNC(0x1, ISelfController, LockExit), @@ -118,8 +128,10 @@ namespace skyline::service::am { SFUNC(0x10, ISelfController, SetOutOfFocusSuspendingEnabled), SFUNC(0x13, ISelfController, SetAlbumImageOrientation), SFUNC(0x28, ISelfController, CreateManagedDisplayLayer), + SFUNC(0x3E, ISelfController, SetIdleTimeDetectionExtension), SFUNC(0x5A, ISelfController, GetAccumulatedSuspendedTickValue), - SFUNC(0x5B, ISelfController, GetAccumulatedSuspendedTickChangedEvent) + SFUNC(0x5B, ISelfController, GetAccumulatedSuspendedTickChangedEvent), + SFUNC(0x64, ISelfController, SetAlbumImageTakenNotificationEnabled) ) }; }