From 1457b6a6eb7a42463e09249e9203f414efeaa05f Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Thu, 10 Aug 2023 09:55:39 +0200 Subject: [PATCH] early-access version 3800 --- README.md | 2 +- src/core/hle/service/pctl/pctl_module.cpp | 24 ++++++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e6a024107..de0434e02 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 3798. +This is the source code for early-access 3800. ## Legal Notice diff --git a/src/core/hle/service/pctl/pctl_module.cpp b/src/core/hle/service/pctl/pctl_module.cpp index 83b488ddc..7da923424 100755 --- a/src/core/hle/service/pctl/pctl_module.cpp +++ b/src/core/hle/service/pctl/pctl_module.cpp @@ -152,7 +152,7 @@ private: if (pin_code[0] == '\0') { return true; } - if (!restriction_settings.is_free_communication_default_on) { + if (!settings.is_free_communication_default_on) { return true; } // TODO(ogniK): Check for blacklisted/exempted applications. Return false can happen here @@ -168,21 +168,21 @@ private: if (pin_code[0] == '\0') { return true; } - if (!restriction_settings.is_stero_vision_restricted) { + if (!settings.is_stero_vision_restricted) { return false; } return true; } void SetStereoVisionRestrictionImpl(bool is_restricted) { - if (restriction_settings.disabled) { + if (settings.disabled) { return; } if (pin_code[0] == '\0') { return; } - restriction_settings.is_stero_vision_restricted = is_restricted; + settings.is_stero_vision_restricted = is_restricted; } void Initialize(HLERequestContext& ctx) { @@ -430,7 +430,7 @@ private: } rb.Push(ResultSuccess); - rb.Push(restriction_settings.is_stero_vision_restricted); + rb.Push(settings.is_stero_vision_restricted); } void ResetConfirmedStereoVisionPermission(HLERequestContext& ctx) { @@ -460,22 +460,28 @@ private: bool stereo_vision{}; }; - // This is nn::pctl::RestrictionSettings - struct RestrictionSettings { + struct ParentalControlSettings { bool is_stero_vision_restricted{}; bool is_free_communication_default_on{}; bool disabled{}; }; + + // This is nn::pctl::RestrictionSettings + struct RestrictionSettings { + u8 rating_age; + bool sns_post_restriction; + bool free_communication_restriction; + }; static_assert(sizeof(RestrictionSettings) == 0x3, "RestrictionSettings has incorrect size."); // This is nn::pctl::PlayTimerSettings struct PlayTimerSettings { - // TODO: RE the actual contents of this struct - std::array settings; + std::array settings; }; static_assert(sizeof(PlayTimerSettings) == 0x34, "PlayTimerSettings has incorrect size."); States states{}; + ParentalControlSettings settings{}; RestrictionSettings restriction_settings{}; std::array pin_code{}; Capability capability{};