From 2b4adee213e343f610bc669b1a8a9a213aaab32c Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Thu, 9 Jul 2020 14:42:10 +0100 Subject: [PATCH] Stub gameplay recording and save data checking functions Gameplay recording does not need to be emulated and EnsureSaveData isn't necessary for proper save data support. --- .../am/controller/IApplicationFunctions.cpp | 13 ++++++++++++- .../am/controller/IApplicationFunctions.h | 15 +++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.cpp b/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.cpp index 391ea008..001652bf 100644 --- a/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.cpp +++ b/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.cpp @@ -8,8 +8,11 @@ namespace skyline::service::am { IApplicationFunctions::IApplicationFunctions(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager, Service::am_IApplicationFunctions, "am:IApplicationFunctions", { {0x1, SFUNC(IApplicationFunctions::PopLaunchParameter)}, + {0x14, SFUNC(IApplicationFunctions::EnsureSaveData)}, {0x15, SFUNC(IApplicationFunctions::GetDesiredLanguage)}, - {0x28, SFUNC(IApplicationFunctions::NotifyRunning)} + {0x28, SFUNC(IApplicationFunctions::NotifyRunning)}, + {0x42, SFUNC(IApplicationFunctions::InitializeGamePlayRecording)}, + {0x43, SFUNC(IApplicationFunctions::SetGamePlayRecordingState)}, }) {} void IApplicationFunctions::PopLaunchParameter(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { @@ -25,6 +28,10 @@ namespace skyline::service::am { manager.RegisterService(storageService, session, response); } + void IApplicationFunctions::EnsureSaveData(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + response.Push(0); + } + void IApplicationFunctions::GetDesiredLanguage(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { response.Push(util::MakeMagic("en-US")); } @@ -32,4 +39,8 @@ namespace skyline::service::am { void IApplicationFunctions::NotifyRunning(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { response.Push(1); } + + void IApplicationFunctions::InitializeGamePlayRecording(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {} + + void IApplicationFunctions::SetGamePlayRecordingState(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {} } diff --git a/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.h b/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.h index 0f80aa99..12843eab 100644 --- a/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.h +++ b/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.h @@ -19,6 +19,11 @@ namespace skyline::service::am { */ void PopLaunchParameter(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** + * @brief This creates a save data folder for the requesting application (https://switchbrew.org/wiki/Applet_Manager_services#EnsureSaveData) + */ + void EnsureSaveData(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** * @brief This returns the desired language for the application (https://switchbrew.org/wiki/Applet_Manager_services#GetDesiredLanguage) */ @@ -28,5 +33,15 @@ namespace skyline::service::am { * @brief This returns if the application is running or not, always returns true (https://switchbrew.org/wiki/Applet_Manager_services#NotifyRunning) */ void NotifyRunning(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + + /** + * @brief This initializes gameplay recording (https://switchbrew.org/wiki/Applet_Manager_services#InitializeGamePlayRecording) + */ + void InitializeGamePlayRecording(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + + /** + * @brief This controls the gameplay recording state (https://switchbrew.org/wiki/Applet_Manager_services#SetGamePlayRecordingState) + */ + void SetGamePlayRecordingState(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); }; }