From e9a1f29e936e8da5899c360394f37c7646150e3f Mon Sep 17 00:00:00 2001 From: Chloe Marcec Date: Sat, 27 Mar 2021 02:03:18 +1100 Subject: pctl: Rework how pctl works to be more accurate Introduces the usage of compatibilities to allow it the module to be closer to how it works on hardware. --- src/core/file_sys/control_metadata.cpp | 8 ++++++++ src/core/file_sys/control_metadata.h | 2 ++ 2 files changed, 10 insertions(+) (limited to 'src/core/file_sys') diff --git a/src/core/file_sys/control_metadata.cpp b/src/core/file_sys/control_metadata.cpp index b0a130345..f66759815 100644 --- a/src/core/file_sys/control_metadata.cpp +++ b/src/core/file_sys/control_metadata.cpp @@ -100,6 +100,14 @@ u64 NACP::GetDeviceSaveDataSize() const { return raw.device_save_data_size; } +u32 NACP::GetParentalControlFlag() const { + return raw.parental_control; +} + +const std::array& NACP::GetRatingAge() const { + return raw.rating_age; +} + std::vector NACP::GetRawBytes() const { std::vector out(sizeof(RawNACP)); std::memcpy(out.data(), &raw, sizeof(RawNACP)); diff --git a/src/core/file_sys/control_metadata.h b/src/core/file_sys/control_metadata.h index 403c4219a..dd9837cf5 100644 --- a/src/core/file_sys/control_metadata.h +++ b/src/core/file_sys/control_metadata.h @@ -114,6 +114,8 @@ public: std::vector GetRawBytes() const; bool GetUserAccountSwitchLock() const; u64 GetDeviceSaveDataSize() const; + u32 GetParentalControlFlag() const; + const std::array& GetRatingAge() const; private: RawNACP raw{}; -- cgit v1.2.3