diff options
| author | Ac_K <Acoustik666@gmail.com> | 2019-06-16 00:35:38 +0200 |
|---|---|---|
| committer | Thomas Guillemard <me@thog.eu> | 2019-06-16 00:35:38 +0200 |
| commit | 5c1bc524092b3c5d867ce6204ac9db27b7359d3f (patch) | |
| tree | 6176a128cb171a0b58b8fe12da87a346d2acf2aa /Ryujinx.HLE/Utilities | |
| parent | d8d5f2cbe703aa2ef2d1bb9211b3056da94b0168 (diff) | |
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
Diffstat (limited to 'Ryujinx.HLE/Utilities')
| -rw-r--r-- | Ryujinx.HLE/Utilities/UInt128.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Ryujinx.HLE/Utilities/UInt128.cs b/Ryujinx.HLE/Utilities/UInt128.cs index aa348e7e..8f5fc28f 100644 --- a/Ryujinx.HLE/Utilities/UInt128.cs +++ b/Ryujinx.HLE/Utilities/UInt128.cs @@ -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; } } -} +}
\ No newline at end of file |
