From 5c1bc524092b3c5d867ce6204ac9db27b7359d3f Mon Sep 17 00:00:00 2001 From: Ac_K Date: Sun, 16 Jun 2019 00:35:38 +0200 Subject: 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 --- Ryujinx.HLE/Utilities/UInt128.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Ryujinx.HLE/Utilities') 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 -- cgit v1.2.3