Repository navigation
feat(bridge): answer account, age, country, language and parental control for a signed in AnyPlay player - #42
Merged
Merged
Conversation
…trol for a signed in AnyPlay player
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
With the net bridge on and the AnyPlay player signed in, every NP account query a game makes before it offers multiplayer now answers a consistent, unrestricted, signed in state for the AnyPlay network. Before,
sceNpGetStateand the identity calls already followed the bridge (andsceNpCheckPlus/sceNpCheckPremiumsince #24), but the account details around them (country, age, language, parental control, availability, presence, lookups by online id) still answered "signed out" or "user not found", so a title could see a signed in player with no usable account.Only the initial user, and an online id, account id or user id that names that same player, is answered. Another user, a stranger's online id and every signed out or bridge-off case answer exactly as before.
sceNpGetAccountCountryA,sceNpManagerIntGetAccountCountryA,sceNpGetAccountCountrySIGNED_OUT/USER_NOT_FOUNDussceNpGetAccountAge,sceNpManagerIntGetAccountAgeSIGNED_OUTsceNpGetParentalControlInfo,sceNpGetParentalControlInfoAUSER_NOT_FOUND/SIGNED_OUTsceNpGetAccountLanguageA,sceNpGetAccountLanguage,sceNpGetAccountLanguage2,sceNpManagerIntGetAccountLanguageASIGNED_OUT/USER_NOT_FOUNDANYPS5_LANGUAGE, defaulten)sceNpCheckNpAvailability,sceNpCheckNpAvailabilityA,sceNpCheckNpReachabilityUSER_NOT_FOUND/SIGNED_OUTsceNpGetGamePresenceStatus,sceNpGetGamePresenceStatusAsceNpSetGamePresenceOnlineSIGNED_OUTsceNpIsPlusMembersceNpCheckPlus(ADR 0021): signed in and not banned, for the AnyPlay network onlysceNpGetUserIdByOnlineId,sceNpManagerIntGetUserIdByOnlineId,sceNpGetUserIdByAccountId,sceNpGetAccountIdSIGNED_OUTUnchanged on purpose:
sceNpAuthGetAuthorizedAppCodeand every auth code or ID token call keep answering signed out (no token for a publisher's or Sony's servers is ever produced);sceNpGetAccountDateOfBirthandsceNpGetAccountDateOfBirthAstill answer signed out (the network holds no date of birth); the C++ WebApi layer (libSceNpCppWebApi, includingcommunicationRestrictionStatusthrough it) still answers not signed in and is not touched here.Country, age and language are neutral constants because an AnyPlay account has none of them; the debt file says so and what closes it.
Which behaviour this should unlock
A title that stays blocked on "multiplayer not allowed by the platform" while signed out checks
sceNpGetStatefirst (answered 1 before sign in) and, once signed in, the online-permission check (#24), the communication restriction, and the account's age, country and parental control. This PR closes the last group. Best guess for the first title this is meant for: after sign in, the sequence state 2, premium/plus authorized, communication restriction not restricted, parental control all clear, which should flip a greyed multiplayer toggle on.Tested
Not built locally (the C++ tree is built by CI only). New assertions in
np_manager_net_bridge_testscover every row signed in, for another user, for a stranger's online id, for a deleted or missing request, for null outputs and after sign out; the language row also checksANYPS5_LANGUAGE.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Need help on this PR? Tag
@codesmith-botwith what you need.