Skip to content

Commit

Permalink
fix: Clamp bit-size to 4 for gray-4 frames. Fixes #405.
Browse files Browse the repository at this point in the history
  • Loading branch information
freezy committed Aug 20, 2023
1 parent 6787d60 commit 25615f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions PinMameDevice/DmdDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ private static void InternalRenderRgb24Device(DeviceInstance device, ushort widt

private static void InternalRenderRaw4Device(DeviceInstance device, ushort width, ushort height, IntPtr currbuffer, ushort noOfRawFrames, IntPtr currrawbuffer)
{
noOfRawFrames = Math.Min(noOfRawFrames, (ushort)4);
var frameSize = width * height;
var frame = new byte[frameSize];
Marshal.Copy(currbuffer, frame, 0, frameSize);
Expand Down

0 comments on commit 25615f1

Please sign in to comment.