From 22ea33f532b6d4fe1896bcc1259c02cdb8c18fda Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 16 Aug 2020 23:05:42 +0800 Subject: [PATCH] Update NACP process to support latest NACP spec. --- src/NacpProcess.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/NacpProcess.cpp b/src/NacpProcess.cpp index 78bfd4b..1dbe44e 100644 --- a/src/NacpProcess.cpp +++ b/src/NacpProcess.cpp @@ -489,4 +489,37 @@ void NacpProcess::displayNacp() std::cout << " IsEnabled: " << std::boolalpha << mNacp.getJitConfiguration().is_enabled << std::endl; std::cout << " MemorySize: 0x" << std::hex << std::setw(16) << std::setfill('0') << mNacp.getJitConfiguration().memory_size << std::endl; } + + // PlayReportPermission + if (mNacp.getPlayReportPermission() != nn::hac::nacp::PlayReportPermission::None || _HAS_BIT(mCliOutputMode, OUTPUT_EXTENDED)) + { + std::cout << " PlayReportPermission: " << nn::hac::ApplicationControlPropertyUtil::getPlayReportPermissionAsString(mNacp.getPlayReportPermission()) << std::endl; + } + + // CrashScreenshotForProd + if (mNacp.getCrashScreenshotForProd() != nn::hac::nacp::CrashScreenshotForProd::Deny || _HAS_BIT(mCliOutputMode, OUTPUT_EXTENDED)) + { + std::cout << " CrashScreenshotForProd: " << nn::hac::ApplicationControlPropertyUtil::getCrashScreenshotForProdAsString(mNacp.getCrashScreenshotForProd()) << std::endl; + } + + // CrashScreenshotForDev + if (mNacp.getCrashScreenshotForDev() != nn::hac::nacp::CrashScreenshotForDev::Deny || _HAS_BIT(mCliOutputMode, OUTPUT_EXTENDED)) + { + std::cout << " CrashScreenshotForDev: " << nn::hac::ApplicationControlPropertyUtil::getCrashScreenshotForDevAsString(mNacp.getCrashScreenshotForDev()) << std::endl; + } + + // AccessibleLaunchRequiredVersion + if (mNacp.getAccessibleLaunchRequiredVersionApplicationId().size() > 0) + { + std::cout << " AccessibleLaunchRequiredVersion:" << std::endl; + std::cout << " ApplicationId:" << std::endl; + for (auto itr = mNacp.getAccessibleLaunchRequiredVersionApplicationId().begin(); itr != mNacp.getAccessibleLaunchRequiredVersionApplicationId().end(); itr++) + { + std::cout << " 0x" << std::hex << std::setw(16) << std::setfill('0') << *itr << std::endl; + } + } + else if (_HAS_BIT(mCliOutputMode, OUTPUT_EXTENDED)) + { + std::cout << " AccessibleLaunchRequiredVersion: None" << std::endl; + } } \ No newline at end of file