Ryujinx/Ryujinx.HLE/OsHle/Utilities/EndianSwap.cs

9 lines
284 B
C#
Raw Normal View History

namespace Ryujinx.HLE.OsHle.Utilities
{
static class EndianSwap
{
public static short Swap16(short Value) => (short)(((Value >> 8) & 0xff) | (Value << 8));
2018-06-15 19:22:04 +02:00
public static ushort Swap16(ushort Value) => (ushort)(((Value >> 8) & 0xff) | (Value << 8));
}
}