Prepo: Fix SaveSystemReport* IPC definitions (#4278)
* Prepo: Fix SaveSystemReport IPC definitions * Follow original code * Fix args index in HipcGenerator * Addresses feedback * oops
This commit is contained in:
@@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
|
||||
namespace Ryujinx.Horizon.Sdk.Account
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public readonly record struct Uid
|
||||
readonly record struct Uid
|
||||
{
|
||||
public readonly long High;
|
||||
public readonly long Low;
|
||||
|
52
Ryujinx.Horizon/Sdk/Ncm/ApplicationId.cs
Normal file
52
Ryujinx.Horizon/Sdk/Ncm/ApplicationId.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
namespace Ryujinx.Horizon.Sdk.Ncm
|
||||
{
|
||||
readonly struct ApplicationId
|
||||
{
|
||||
public readonly ulong Id;
|
||||
|
||||
public static int Length => sizeof(ulong);
|
||||
|
||||
public static ApplicationId First => new(0x0100000000010000);
|
||||
|
||||
public static ApplicationId Last => new(0x01FFFFFFFFFFFFFF);
|
||||
|
||||
public static ApplicationId Invalid => new(0);
|
||||
|
||||
public bool IsValid => Id >= First.Id && Id <= Last.Id;
|
||||
|
||||
public ApplicationId(ulong id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is ApplicationId applicationId && applicationId.Equals(this);
|
||||
}
|
||||
|
||||
public bool Equals(ApplicationId other)
|
||||
{
|
||||
return other.Id == Id;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Id.GetHashCode();
|
||||
}
|
||||
|
||||
public static bool operator ==(ApplicationId lhs, ApplicationId rhs)
|
||||
{
|
||||
return lhs.Equals(rhs);
|
||||
}
|
||||
|
||||
public static bool operator !=(ApplicationId lhs, ApplicationId rhs)
|
||||
{
|
||||
return !lhs.Equals(rhs);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"0x{Id:x}";
|
||||
}
|
||||
}
|
||||
}
|
@@ -12,8 +12,8 @@ namespace Ryujinx.Horizon.Sdk.Prepo
|
||||
Result RequestImmediateTransmission();
|
||||
Result GetTransmissionStatus(out int status);
|
||||
Result GetSystemSessionId(out ulong systemSessionId);
|
||||
Result SaveSystemReport(ReadOnlySpan<byte> gameRoomBuffer, ReadOnlySpan<byte> reportBuffer, ulong pid);
|
||||
Result SaveSystemReportWithUser(Uid userId, ReadOnlySpan<byte> gameRoomBuffer, ReadOnlySpan<byte> reportBuffer, ulong pid);
|
||||
Result SaveSystemReport(ReadOnlySpan<byte> gameRoomBuffer, Ncm.ApplicationId applicationId, ReadOnlySpan<byte> reportBuffer);
|
||||
Result SaveSystemReportWithUser(Uid userId, ReadOnlySpan<byte> gameRoomBuffer, Ncm.ApplicationId applicationId, ReadOnlySpan<byte> reportBuffer);
|
||||
Result IsUserAgreementCheckEnabled(out bool enabled);
|
||||
Result SetUserAgreementCheckEnabled(bool enabled);
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@ namespace Ryujinx.Horizon.Sdk.Sm
|
||||
{
|
||||
public static ServiceName Invalid { get; } = new ServiceName(0);
|
||||
|
||||
public bool IsInvalid => Packed == 0;
|
||||
public bool IsValid => Packed != 0;
|
||||
|
||||
public int Length => sizeof(ulong);
|
||||
|
||||
|
Reference in New Issue
Block a user