diff --git a/src/BizHawk.Client.EmuHawk/tools/GBA/GBAGPUView.cs b/src/BizHawk.Client.EmuHawk/tools/GBA/GBAGPUView.cs index a6c3e91f65..de9619b140 100644 --- a/src/BizHawk.Client.EmuHawk/tools/GBA/GBAGPUView.cs +++ b/src/BizHawk.Client.EmuHawk/tools/GBA/GBAGPUView.cs @@ -7,7 +7,6 @@ using BizHawk.Client.Common; using BizHawk.Common.NumberExtensions; using BizHawk.Emulation.Cores.Nintendo.Gameboy; using BizHawk.Emulation.Cores.Nintendo.GBA; -using BizHawk.Common; using BizHawk.Emulation.Common; namespace BizHawk.Client.EmuHawk @@ -415,7 +414,8 @@ namespace BizHawk.Client.EmuHawk Bitmap bmp = mbv.BmpView.Bmp; var lockData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); - Win32Imports.MemSet(lockData.Scan0, 0xff, (uint)(lockData.Height * lockData.Stride)); + byte* clear_out = (byte*)lockData.Scan0; + for (uint i = 0; i < (uint)(lockData.Height * lockData.Stride); i++) { clear_out[i] = 0xFF; } int* pixels = (int*)lockData.Scan0; int pitch = lockData.Stride / sizeof(int); @@ -507,7 +507,9 @@ namespace BizHawk.Client.EmuHawk if (tophalfonly) { - Win32Imports.MemSet(lockData.Scan0, 0xff, (uint)(128 * lockData.Stride)); + byte* clear_out = (byte*)lockData.Scan0; + for (uint i = 0; i < (uint)(128 * lockData.Stride); i++) { clear_out[i] = 0xFF; } + pixels += 128 * pitch; tiles += 16384; }