mirror of
https://git.zaroz.cloud/nintendo-back-up/Ryujinx.git
synced 2025-06-07 11:45:26 +00:00

* Horizon: Implement arp:r and arp:w services * Fix formatting * Remove HLE arp services * Revert "Remove HLE arp services" This reverts commit c576fcccadb963db56b96bacabd1c1ac7abfb1ab. * Keep LibHac impl since it's used in bcat * Addresses gdkchan's feedback * ArpApi in PrepoIpcServer and remove LmApi * Fix 2 * Fixes ArpApi init * Fix encoding * Update PrepoService.cs * Fix prepo
53 lines
1.2 KiB
C#
53 lines
1.2 KiB
C#
namespace Ryujinx.Horizon.Sdk.Ncm
|
|
{
|
|
public 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}";
|
|
}
|
|
}
|
|
}
|