Skip to content

Commit

Permalink
changed transport mode for 16 color modes for smoother animations
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalkbrenner committed Jan 1, 2024
1 parent 48ab3a8 commit 6d0b3c6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions LibDmd/Output/ZeDMD/ZeDMDHD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,32 +64,37 @@ protected void Init()
public void RenderGray2(DmdFrame frame)
{
DmdAllowHdScaling = true;
ZeDMD_EnablePreUpscaling(_pZeDMD);
ZeDMD_RenderGray2(_pZeDMD, frame.Data);
}

public void RenderColoredGray2(ColoredFrame frame)
{
DmdAllowHdScaling = true;
ZeDMD_EnablePreUpscaling(_pZeDMD);
SetPalette(frame.Palette);
ZeDMD_RenderGray2(_pZeDMD, frame.Data);
}

public void RenderGray4(DmdFrame frame)
{
DmdAllowHdScaling = true;
ZeDMD_DisablePreUpscaling(_pZeDMD);
ZeDMD_RenderGray4(_pZeDMD, frame.Data);
}

public void RenderColoredGray4(ColoredFrame frame)
{
DmdAllowHdScaling = true;
ZeDMD_DisablePreUpscaling(_pZeDMD);
SetPalette(frame.Palette);
ZeDMD_RenderGray4(_pZeDMD, frame.Data);
}

public void RenderColoredGray6(ColoredFrame frame)
{
DmdAllowHdScaling = true;
ZeDMD_EnablePreUpscaling(_pZeDMD);
SetPalette(frame.Palette);
ZeDMD_RenderColoredGray6(_pZeDMD, frame.Data, frame.Rotations);
_lastFrame = (ColoredFrame)frame.Clone();
Expand All @@ -98,6 +103,7 @@ public void RenderColoredGray6(ColoredFrame frame)
public void RenderRgb24(DmdFrame frame)
{
DmdAllowHdScaling = ScaleRgb24;
ZeDMD_EnablePreUpscaling(_pZeDMD);
ZeDMD_RenderRgb24(_pZeDMD, frame.Data);
}

Expand Down

0 comments on commit 6d0b3c6

Please sign in to comment.