[NpManager] added offline signup status

This commit is contained in:
ParantezTech 2026-09-29 15:00:41 +03:00
parent e302816af1
commit d9eafdbca6
1 changed files with 20 additions and 0 deletions

View File

@ -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",