Skip to content

Commit b10c3c7

Browse files
Stub an actual code for sceNpAuthGetAuthorizationCode functions (#4369)
I've had exactly one game specifically complain about the auth code being empty. Provide some code so relevant titles work a little better.
1 parent 6623489 commit b10c3c7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/core/libraries/np/np_auth.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ s32 GetAuthorizationCode(s32 req_id, const OrbisNpAuthGetAuthorizationCodeParame
123123

124124
// Not sure what values are expected here, so zeroing these for now.
125125
std::memset(auth_code, 0, sizeof(OrbisNpAuthorizationCode));
126+
std::strncpy(auth_code->code, "AUTHCODE", 9);
126127
if (issuer_id != nullptr) {
127-
*issuer_id = 0;
128+
*issuer_id = 100;
128129
}
129130
return ORBIS_OK;
130131
}
@@ -220,6 +221,7 @@ s32 GetIdToken(s32 req_id, const OrbisNpAuthGetIdTokenParameterA* param, s32 fla
220221

221222
// Not sure what values are expected here, so zeroing this for now.
222223
std::memset(token, 0, sizeof(OrbisNpIdToken));
224+
std::strncpy(token->token, "TOKEN", 6);
223225
return ORBIS_OK;
224226
}
225227

0 commit comments

Comments
 (0)