Skip to content

Commit

Permalink
fixed RGB24Depth adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalkbrenner committed Feb 22, 2024
1 parent 74da287 commit fdfdb4c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/DMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ void DMD::ZeDMDThread()
// ZeDMD HD supports 256 * 64 pixels.
uint8_t rgb24Data[256 * 64 * 3];

AdjustRGB24Depth(m_updateBuffer[bufferPosition]->data, rgb24Data, width * height, palette,
AdjustRGB24Depth(m_updateBuffer[bufferPosition]->data, rgb24Data, width * height * 3, palette,
m_updateBuffer[bufferPosition]->depth);
m_pZeDMD->RenderRgb24(rgb24Data);
}
Expand Down Expand Up @@ -643,7 +643,7 @@ void DMD::PixelcadeDMDThread()
if (m_updateBuffer[bufferPosition]->mode == DMDMode::RGB24)
{
uint8_t rgb24Data[128 * 32 * 3];
AdjustRGB24Depth(m_updateBuffer[bufferPosition]->data, rgb24Data, length, palette,
AdjustRGB24Depth(m_updateBuffer[bufferPosition]->data, rgb24Data, length * 3, palette,
m_updateBuffer[bufferPosition]->depth);
for (int i = 0; i < length; i++)
{
Expand Down Expand Up @@ -802,7 +802,7 @@ void DMD::RGB24DMDThread()
m_updateBuffer[bufferPosition]->g, m_updateBuffer[bufferPosition]->b);
}

AdjustRGB24Depth(m_updateBuffer[bufferPosition]->data, rgb24Data, length, palette,
AdjustRGB24Depth(m_updateBuffer[bufferPosition]->data, rgb24Data, length * 3, palette,
m_updateBuffer[bufferPosition]->depth);

for (RGB24DMD* pRGB24DMD : m_rgb24DMDs)
Expand Down Expand Up @@ -967,7 +967,7 @@ void DMD::AdjustRGB24Depth(uint8_t* pData, uint8_t* pDstData, int length, uint8_
}
else
{
memcpy(pDstData, pData, length * 3);
memcpy(pDstData, pData, length);
}
}

Expand Down

0 comments on commit fdfdb4c

Please sign in to comment.