[Share] Added sceShareGetRunningStatus

This commit is contained in:
ParantezTech 2026-09-22 04:16:44 +03:00
parent a86f67393b
commit 7d299c6b87
1 changed files with 22 additions and 0 deletions

View File

@ -139,6 +139,28 @@ public static class ShareExports
return ctx.SetReturn(OrbisGen2Result.ORBIS_GEN2_OK);
}
[SysAbiExport(
Nid = "crFxyW3HdK0",
ExportName = "sceShareGetRunningStatus",
Target = Generation.Gen4 | Generation.Gen5,
LibraryName = "libSceShareUtility")]
public static int ShareGetRunningStatus(CpuContext ctx)
{
var featureFlagsAddress = ctx[CpuRegister.Rdi];
if (featureFlagsAddress == 0)
{
return ctx.SetReturn(OrbisGen2Result.ORBIS_GEN2_ERROR_INVALID_ARGUMENT);
}
if (!ctx.TryWriteUInt32(featureFlagsAddress, 0))
{
return ctx.SetReturn(OrbisGen2Result.ORBIS_GEN2_ERROR_MEMORY_FAULT);
}
TraceShare("get_running_status flags=0");
return ctx.SetReturn(OrbisGen2Result.ORBIS_GEN2_OK);
}
private static bool TryReadNullTerminatedUtf8(CpuContext ctx, ulong address, int maxLength, out string value)
{
Span<byte> bytes = stackalloc byte[maxLength];