mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-07-01 17:55:23 +02:00
[hle] stubbed extra services from (parental controls and stuff) fw21 (#3175)
Adds more Firmware 20+ related service commands. Renames existing service commands according to switchbrew docs, Unstubs new parental service stuff. Signed-off-by: lizzie lizzie@eden-emu.dev Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3175 Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev> Co-authored-by: Maufeat <sahyno1996@gmail.com> Co-committed-by: Maufeat <sahyno1996@gmail.com>
This commit is contained in:
parent
959f72297d
commit
1d869e8495
30 changed files with 713 additions and 339 deletions
|
|
@ -39,6 +39,9 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili
|
|||
{1017, D<&IParentalControlService::EndFreeCommunication>, "EndFreeCommunication"},
|
||||
{1018, D<&IParentalControlService::IsFreeCommunicationAvailable>, "IsFreeCommunicationAvailable"},
|
||||
{1019, D<&IParentalControlService::ConfirmLaunchApplicationPermission>, "ConfirmLaunchApplicationPermission"},
|
||||
{1020, nullptr, "ConfirmLaunchSharedApplicationPermission"}, //20.0.0+
|
||||
{1021, nullptr, "TryBeginFreeCommunicationForStreamPlay"}, //21.0.0+
|
||||
{1022, nullptr, "EndFreeCommunicationForStreamPlay"}, //21.0.0+
|
||||
{1031, D<&IParentalControlService::IsRestrictionEnabled>, "IsRestrictionEnabled"},
|
||||
{1032, D<&IParentalControlService::GetSafetyLevel>, "GetSafetyLevel"},
|
||||
{1033, nullptr, "SetSafetyLevel"},
|
||||
|
|
@ -56,6 +59,8 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili
|
|||
{1047, nullptr, "NotifyApplicationDownloadStarted"},
|
||||
{1048, nullptr, "NotifyNetworkProfileCreated"},
|
||||
{1049, nullptr, "ResetFreeCommunicationApplicationList"},
|
||||
{1050, nullptr, "AddToFreeCommunicationApplicationList"}, //20.0.0+
|
||||
{1051, nullptr, "NotifyApplicationDownloadStarted"}, //20.0.0+
|
||||
{1061, D<&IParentalControlService::ConfirmStereoVisionRestrictionConfigurable>, "ConfirmStereoVisionRestrictionConfigurable"},
|
||||
{1062, D<&IParentalControlService::GetStereoVisionRestriction>, "GetStereoVisionRestriction"},
|
||||
{1063, D<&IParentalControlService::SetStereoVisionRestriction>, "SetStereoVisionRestriction"},
|
||||
|
|
@ -126,8 +131,17 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili
|
|||
{2013, nullptr, "SynchronizeParentalControlSettingsAsync"},
|
||||
{2014, nullptr, "FinishSynchronizeParentalControlSettings"},
|
||||
{2015, nullptr, "FinishSynchronizeParentalControlSettingsWithLastUpdated"},
|
||||
{2016, nullptr, "RequestUpdateExemptionListAsync"},
|
||||
{145601, D<&IParentalControlService::GetPlayTimerSettings>, "GetPlayTimerSettings"} // 18.0.0+
|
||||
{2016, nullptr, "RequestUpdateExemptionListAsync"}, //5.0.0+
|
||||
{145601, D<&IParentalControlService::GetPlayTimerSettings>, "GetPlayTimerSettings"}, // 18.0.0+
|
||||
{2017, nullptr, "AuthorizePairingAsync"}, //19.0.0+
|
||||
{2019, nullptr, "RequestUpdateDeviceUsersBackground"}, //19.0.0+
|
||||
{2021, nullptr, "RequestCopyPairingAsync"}, //20.0.0+
|
||||
{2022, nullptr, "FinishRequestCopyPairing"}, //20.0.0+
|
||||
{2023, nullptr, "IsFromPairingActiveDevice"}, //20.0.0+
|
||||
{2024, nullptr, "RollbackCopyPairing"}, //21.0.0+
|
||||
{3001, nullptr, "GetErrorContextChangedEvent"}, //20.0.0+
|
||||
{145601, D<&IParentalControlService::GetPlayTimerSettings>, "GetPlayTimerSettings"}, // 18.0.0+
|
||||
{195101, D<&IParentalControlService::SetPlayTimerSettings>, "SetPlayTimerSettingsForDebug"}, //18.0.0+
|
||||
};
|
||||
// clang-format on
|
||||
RegisterHandlers(functions);
|
||||
|
|
@ -393,16 +407,21 @@ Result IParentalControlService::IsRestrictedByPlayTimer(Out<bool> out_is_restric
|
|||
}
|
||||
|
||||
Result IParentalControlService::GetPlayTimerSettingsOld(
|
||||
Out<PlayTimerSettings> out_play_timer_settings) {
|
||||
Out<PlayTimerSettingsOld> out_play_timer_settings) {
|
||||
LOG_WARNING(Service_PCTL, "(STUBBED) called");
|
||||
*out_play_timer_settings = {};
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result IParentalControlService::GetPlayTimerSettings(
|
||||
Out<PlayTimerSettings> out_play_timer_settings) {
|
||||
Result IParentalControlService::GetPlayTimerSettings(Out<PlayTimerSettings> out_play_timer_settings) {
|
||||
LOG_WARNING(Service_PCTL, "(STUBBED) called");
|
||||
*out_play_timer_settings = {};
|
||||
*out_play_timer_settings = raw_play_timer_settings;
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result IParentalControlService::SetPlayTimerSettings(PlayTimerSettings play_timer_settings) {
|
||||
LOG_WARNING(Service_PCTL, "(STUBBED) called");
|
||||
raw_play_timer_settings = play_timer_settings;
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ private:
|
|||
Result IsPlayTimerEnabled(Out<bool> out_is_play_timer_enabled);
|
||||
Result GetPlayTimerRemainingTime(Out<s32> out_remaining_time);
|
||||
Result IsRestrictedByPlayTimer(Out<bool> out_is_restricted_by_play_timer);
|
||||
Result GetPlayTimerSettingsOld(Out<PlayTimerSettings> out_play_timer_settings);
|
||||
Result GetPlayTimerSettingsOld(Out<PlayTimerSettingsOld> out_play_timer_settings);
|
||||
Result GetPlayTimerEventToRequestSuspension(OutCopyHandle<Kernel::KReadableEvent> out_event);
|
||||
Result IsPlayTimerAlarmDisabled(Out<bool> out_play_timer_alarm_disabled);
|
||||
Result GetPlayTimerRemainingTimeDisplayInfo();
|
||||
|
|
@ -60,6 +60,7 @@ private:
|
|||
Result SetStereoVisionRestriction(bool stereo_vision_restriction);
|
||||
Result ResetConfirmedStereoVisionPermission();
|
||||
Result GetPlayTimerSettings(Out<PlayTimerSettings> out_play_timer_settings);
|
||||
Result SetPlayTimerSettings(PlayTimerSettings out_play_timer_settings);
|
||||
|
||||
struct States {
|
||||
u64 current_tid{};
|
||||
|
|
@ -83,6 +84,8 @@ private:
|
|||
RestrictionSettings restriction_settings{};
|
||||
std::array<char, 8> pin_code{};
|
||||
Capability capability{};
|
||||
// TODO: this is RAW as fuck
|
||||
PlayTimerSettings raw_play_timer_settings{};
|
||||
|
||||
KernelHelpers::ServiceContext service_context;
|
||||
Event synchronization_event;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
|
@ -34,10 +37,16 @@ struct RestrictionSettings {
|
|||
};
|
||||
static_assert(sizeof(RestrictionSettings) == 0x3, "RestrictionSettings has incorrect size.");
|
||||
|
||||
// This is nn::pctl::PlayTimerSettings
|
||||
struct PlayTimerSettings {
|
||||
// This is nn::pctl::PlayTimerSettingsOld
|
||||
struct PlayTimerSettingsOld {
|
||||
std::array<u32, 13> settings;
|
||||
};
|
||||
static_assert(sizeof(PlayTimerSettings) == 0x34, "PlayTimerSettings has incorrect size.");
|
||||
static_assert(sizeof(PlayTimerSettingsOld) == 0x34, "PlayTimerSettingsOld has incorrect size.");
|
||||
|
||||
// This is nn::pctl::PlayTimerSettings
|
||||
struct PlayTimerSettings {
|
||||
std::array<u32, 17> settings; //21.0.0+ now takes 0x44
|
||||
};
|
||||
static_assert(sizeof(PlayTimerSettings) == 0x44, "PlayTimerSettings has incorrect size.");
|
||||
|
||||
} // namespace Service::PCTL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue