From 67d2c3c0a3d9ccf82b510de9839669b47703b4ce Mon Sep 17 00:00:00 2001 From: Merijn Date: Mon, 5 Oct 2026 19:05:50 +0200 Subject: [PATCH] feat(userservice): implement sceUserServiceGetAgeLevel Report age level 0 for the initial user and reject other users and a null output like the other user queries. The meaning of the value is unknown and recorded in the technical debt; PPSA12544 only stores it for its user profile. Co-Authored-By: Claude Opus 5.5 --- core/libs/prx/libSceUserService/Export.cpp | 9 +++++---- docs/dev/TechnicalDebt.md | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/libs/prx/libSceUserService/Export.cpp b/core/libs/prx/libSceUserService/Export.cpp index 1695f4546..2da7ff360 100644 --- a/core/libs/prx/libSceUserService/Export.cpp +++ b/core/libs/prx/libSceUserService/Export.cpp @@ -49,10 +49,11 @@ int APS5_VABI sceUserServiceGetAccessibilityZoomEnabled(int user_id, int32_t* zo } int APS5_VABI sceUserServiceGetAgeLevel(int user_id, uint32_t* age_level) { - (void)user_id; - (void)age_level; - NotImplemented_nid_no_patch(__func__); - return 0; + if (age_level == nullptr || user_id != USER_SERVICE_INITIAL_USER_ID) { + return USER_SERVICE_ERROR_INVALID_ARGUMENT; + } + *age_level = 0; + return USER_SERVICE_OK; } // The initial user is reported as logging in once; afterwards there are no user events. diff --git a/docs/dev/TechnicalDebt.md b/docs/dev/TechnicalDebt.md index a84ead929..d8a1f4b86 100644 --- a/docs/dev/TechnicalDebt.md +++ b/docs/dev/TechnicalDebt.md @@ -72,6 +72,7 @@ Throughout the project, every function at every stage either **does exactly what - [sceNpSessionSignalingGetConnectionStatistics](../../core/libs/prx/libSceNpSessionSignaling/Export.cpp) (libSceNpSessionSignaling) - unknown signature - [sce::Np::CppWebApi::Common::String](../../core/libs/prx/libSceNpCppWebApi/Export.cpp) (libSceNpCppWebApi) - the 0x20-byte layout (32-bit reference count, buffer at 0x08, buffer size at 0x10, `LibContext*` at 0x18) comes from the module bundled with one title (PPSA21564); other SDK versions are not checked. The destructor throws for a non-null buffer: releasing it needs the `LibContext` allocator, which is not implemented - [sceNpTrophy2UnregisterUnlockCallback](../../core/libs/prx/libSceNpTrophy2/src/Context.cpp) (libSceNpTrophy2) - unknown signature +- [sceUserServiceGetAgeLevel](../../core/libs/prx/libSceUserService/Export.cpp) (libSceUserService) - the meaning of the value is unknown; 0 is reported, as for the unset game presets. PPSA12544 (Unity) only stores it for its user profile - [sceSystemServiceDisableMediaPlay](../../core/libs/prx/libSceSystemService/Export.cpp) (libSceSystemService) - unknown signature - [sceSystemServiceReenableMediaPlay](../../core/libs/prx/libSceSystemService/Export.cpp) (libSceSystemService) - unknown signature - [sceVoiceSetMuteFlag](../../core/libs/prx/libSceVoice/Export.cpp) (libSceVoice) - unknown signature