[NpManager] added offline signup status
This commit is contained in:
parent
e302816af1
commit
d9eafdbca6
|
|
@ -261,6 +261,26 @@ public static class NpManagerExports
|
|||
: SetReturn(ctx, (int)OrbisGen2Result.ORBIS_GEN2_ERROR_MEMORY_FAULT);
|
||||
}
|
||||
|
||||
[SysAbiExport(
|
||||
Nid = "Oad3rvY-NJQ",
|
||||
ExportName = "sceNpHasSignedUp",
|
||||
Target = Generation.Gen4 | Generation.Gen5,
|
||||
LibraryName = "libSceNpManager")]
|
||||
public static int NpHasSignedUp(CpuContext ctx)
|
||||
{
|
||||
var resultAddress = ctx[CpuRegister.Rsi];
|
||||
if (resultAddress == 0 || unchecked((int)ctx[CpuRegister.Rdi]) == -1)
|
||||
{
|
||||
return SetReturn(ctx, NpErrorInvalidArgument);
|
||||
}
|
||||
|
||||
Span<byte> signedUp = stackalloc byte[1];
|
||||
signedUp[0] = 0; // No online account is configured in the offline profile.
|
||||
return ctx.Memory.TryWrite(resultAddress, signedUp)
|
||||
? SetReturn(ctx, 0)
|
||||
: SetReturn(ctx, (int)OrbisGen2Result.ORBIS_GEN2_ERROR_MEMORY_FAULT);
|
||||
}
|
||||
|
||||
[SysAbiExport(
|
||||
Nid = "Ec63y59l9tw",
|
||||
ExportName = "sceNpSetNpTitleId",
|
||||
|
|
|
|||
Loading…
Reference in New Issue