Refactoring of acc:u0 (#701)

* Refactoring of acc:u0

- Move all account things to the account service
- More accurate IAccountServiceForApplication
- Add helper to UInt128

* FIx my engrish

* FIx my engrish #2
This commit is contained in:
Ac_K 2019-06-16 00:35:38 +02:00 committed by Thomas Guillemard
parent d8d5f2cbe7
commit 5c1bc52409
11 changed files with 335 additions and 118 deletions

View file

@ -9,12 +9,20 @@ namespace Ryujinx.HLE.Utilities
public long High { get; private set; }
public long Low { get; private set; }
public bool IsNull => (Low | High) == 0;
public UInt128(long low, long high)
{
Low = low;
High = high;
}
public UInt128(byte[] bytes)
{
Low = BitConverter.ToInt64(bytes, 0);
High = BitConverter.ToInt64(bytes, 8);
}
public UInt128(string hex)
{
if (hex == null || hex.Length != 32 || !hex.All("0123456789abcdefABCDEF".Contains))
@ -42,4 +50,4 @@ namespace Ryujinx.HLE.Utilities
return (Low | High) == 0;
}
}
}
}