Apply Ac_K's suggestion about EndianSwap
This commit is contained in:
parent
2adf6f845b
commit
d7f3cbc6c8
4 changed files with 6 additions and 7 deletions
|
@ -144,9 +144,7 @@ namespace Ryujinx.Common
|
|||
|
||||
if (BitConverter.IsLittleEndian)
|
||||
{
|
||||
byte[] bytes = BitConverter.GetBytes(result);
|
||||
Array.Reverse(bytes, 0, bytes.Length);
|
||||
result = BitConverter.ToUInt32(bytes, 0);
|
||||
result = (uint)EndianSwap.Swap32((int)result);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace Ryujinx.HLE.Utilities
|
||||
namespace Ryujinx.Common
|
||||
{
|
||||
static class EndianSwap
|
||||
public static class EndianSwap
|
||||
{
|
||||
public static ushort Swap16(ushort value) => (ushort)(((value >> 8) & 0xff) | (value << 8));
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
using LibHac.Fs;
|
||||
using LibHac.Fs.NcaUtils;
|
||||
using Ryujinx.Common;
|
||||
using Ryujinx.HLE.FileSystem;
|
||||
using Ryujinx.HLE.FileSystem.Content;
|
||||
using Ryujinx.HLE.Resource;
|
||||
using Ryujinx.HLE.Utilities;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using static Ryujinx.HLE.Utilities.FontUtils;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Common;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.Utilities;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
|
|
Loading…
Add table
Reference in a new issue