Fix ToSysdrawingBitmap(Bitmap) when bitmapbuffer does not have alpha

see https://tasvideos.org/Forum/Posts/530047
This commit is contained in:
CasualPokePlayer 2024-06-24 12:25:54 -07:00
parent 31b8bedad7
commit ce1df52af2
1 changed files with 1 additions and 1 deletions

View File

@ -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)
{