diff --git a/nx/include/switch/services/acc.h b/nx/include/switch/services/acc.h index a41e30cb..429820f8 100644 --- a/nx/include/switch/services/acc.h +++ b/nx/include/switch/services/acc.h @@ -74,6 +74,12 @@ Result accountGetLastOpenedUser(AccountUid *uid); /// Get an AccountProfile for the specified userId. Result accountGetProfile(AccountProfile* out, AccountUid uid); +/// IsUserRegistrationRequestPermitted +Result accountIsUserRegistrationRequestPermitted(bool *out); + +/// TrySelectUserWithoutInteraction +Result accountTrySelectUserWithoutInteraction(AccountUid *uid, bool is_network_service_account_required); + /// Close the AccountProfile. void accountProfileClose(AccountProfile* profile); diff --git a/nx/source/services/acc.c b/nx/source/services/acc.c index 0256a68c..bcdabe38 100644 --- a/nx/source/services/acc.c +++ b/nx/source/services/acc.c @@ -116,6 +116,21 @@ Result accountGetProfile(AccountProfile* out, AccountUid uid) { ); } +Result accountIsUserRegistrationRequestPermitted(bool *out) { + u64 pid_placeholder=0; + u8 tmp=0; + Result rc = serviceDispatchInOut(&g_accSrv, 50, pid_placeholder, tmp, + .in_send_pid = true, + ); + if (R_SUCCEEDED(rc) && out) *out = tmp & 1; + return rc; +} + +Result accountTrySelectUserWithoutInteraction(AccountUid *uid, bool is_network_service_account_required) { + u8 tmp=is_network_service_account_required!=0; + return serviceDispatchInOut(&g_accSrv, 51, tmp, *uid); +} + // IProfile void accountProfileClose(AccountProfile* profile) {