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 dbd1b3a0..101c4123 100644 --- a/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.cpp +++ b/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.cpp @@ -65,6 +65,11 @@ namespace skyline::service::am { return {}; } + Result IApplicationFunctions::GetDisplayVersion(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + response.Push(state.loader->nacp->nacpContents.displayVersion); + return {}; + } + Result IApplicationFunctions::NotifyRunning(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { response.Push(1); return {}; 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 56f1c36b..4dc9bfb0 100644 --- a/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.h +++ b/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.h @@ -42,6 +42,11 @@ namespace skyline::service::am { */ Result GetDesiredLanguage(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** + * @url https://switchbrew.org/wiki/Applet_Manager_services#GetDisplayVersion + */ + Result GetDisplayVersion(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** * @brief Returns if the application is running or not, always returns true * @url https://switchbrew.org/wiki/Applet_Manager_services#NotifyRunning @@ -94,6 +99,7 @@ namespace skyline::service::am { SFUNC(0x1, IApplicationFunctions, PopLaunchParameter), SFUNC(0x14, IApplicationFunctions, EnsureSaveData), SFUNC(0x15, IApplicationFunctions, GetDesiredLanguage), + SFUNC(0x16, IApplicationFunctions, GetDisplayVersion), SFUNC(0x28, IApplicationFunctions, NotifyRunning), SFUNC(0x32, IApplicationFunctions, GetPseudoDeviceId), SFUNC(0x42, IApplicationFunctions, InitializeGamePlayRecording), diff --git a/app/src/main/cpp/skyline/vfs/nacp.h b/app/src/main/cpp/skyline/vfs/nacp.h index 9e5aab14..2fa78e56 100644 --- a/app/src/main/cpp/skyline/vfs/nacp.h +++ b/app/src/main/cpp/skyline/vfs/nacp.h @@ -27,7 +27,9 @@ namespace skyline::vfs { std::array titleEntries; //!< Title entries for each language u8 _pad0_[0x2C]; u32 supportedLanguageFlag; //!< A bitmask containing the game's supported languages - u8 _pad1_[0x48]; + u8 _pad1_[0x30]; + std::array displayVersion; //!< The user-readable version of the application + u8 _pad4_[0x8]; u64 saveDataOwnerId; //!< The ID that should be used for this application's savedata u8 _pad2_[0x78]; std::array seedForPseudoDeviceId; //!< Seed that is combined with the device seed for generating the pseudo-device ID