Don't assume the runtime's endianness.

master
Nabile Rahmani 2018-12-19 16:00:30 +01:00
parent d2e3ddff14
commit e9af937d4d
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ namespace DotN64.Desktop.SDL
var line = (ushort)((vi.CurrentVerticalLine - vi.VerticalVideo.ActiveVideoStart) / (float)(vi.VerticalVideo.ActiveVideoEnd - vi.VerticalVideo.ActiveVideoStart) * frame.Height);
var offset = pitch * line;
if (frame.Size != ControlRegister.PixelSize.RGBA5553)
if (!BitConverter.IsLittleEndian || frame.Size != ControlRegister.PixelSize.RGBA5553)
Marshal.Copy(ram.Memory, (int)vi.DRAMAddress + offset, pixels + offset, pitch);
else
{