From ce1df52af24604f23f720e6da5951f2873484ba5 Mon Sep 17 00:00:00 2001 From: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:25:54 -0700 Subject: [PATCH] Fix ToSysdrawingBitmap(Bitmap) when bitmapbuffer does not have alpha see https://tasvideos.org/Forum/Posts/530047 --- src/BizHawk.Bizware.Graphics/BitmapBuffer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BizHawk.Bizware.Graphics/BitmapBuffer.cs b/src/BizHawk.Bizware.Graphics/BitmapBuffer.cs index f352afe7e7..8399eec030 100644 --- a/src/BizHawk.Bizware.Graphics/BitmapBuffer.cs +++ b/src/BizHawk.Bizware.Graphics/BitmapBuffer.cs @@ -569,7 +569,7 @@ namespace BizHawk.Bizware.Graphics } //note: we lock it as 32bpp even if the bitmap is 24bpp so we can write to it more conveniently. - var bmpdata = bmp.LockBits(new(0, 0, Width, Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); + var bmpdata = bmp.LockBits(new(0, 0, Width, Height), ImageLockMode.WriteOnly, HasAlpha ? PixelFormat.Format32bppArgb : PixelFormat.Format32bppRgb); if (bmpdata.Stride == bmpdata.Width * 4) {