4242#include " AlphaNumeric.h"
4343#include " FrameUtil.h"
4444#include " DMDUtil/Logger.h"
45+ #include " OutputFilters.h"
4546#include " TimeUtils.h"
4647#include " ZeDMD.h"
4748#include " komihash/komihash.h"
@@ -1237,6 +1238,7 @@ void DMD::ZeDMDThread()
12371238 Config* const pConfig = Config::GetInstance ();
12381239 bool showNotColorizedFrames = pConfig->IsShowNotColorizedFrames ();
12391240 bool excludeColorizedFrames = pConfig->IsExcludeColorizedFramesForZeDMD ();
1241+ const int roundedCorners = pConfig->GetRoundedCorners ();
12401242
12411243 while (true )
12421244 {
@@ -1332,12 +1334,16 @@ void DMD::ZeDMDThread()
13321334
13331335 AdjustRGB24Depth (m_pUpdateBufferQueue[bufferPositionMod]->data , rgb24Data, (size_t )width * height, palette,
13341336 m_pUpdateBufferQueue[bufferPositionMod]->depth );
1337+ ApplyRoundedCornersRGB24 (rgb24Data, width, height, roundedCorners);
13351338 m_pZeDMD->RenderRgb888 (rgb24Data);
13361339 }
13371340 else if (m_pUpdateBufferQueue[bufferPositionMod]->mode == Mode::RGB16 ||
13381341 (m_pSerum && IsSerumV2Mode (m_pUpdateBufferQueue[bufferPositionMod]->mode )))
13391342 {
1340- m_pZeDMD->RenderRgb565 (m_pUpdateBufferQueue[bufferPositionMod]->segData );
1343+ uint16_t rgb565Data[256 * 64 ];
1344+ memcpy (rgb565Data, m_pUpdateBufferQueue[bufferPositionMod]->segData , (size_t )frameSize * sizeof (uint16_t ));
1345+ ApplyRoundedCornersRGB565 (rgb565Data, width, height, roundedCorners);
1346+ m_pZeDMD->RenderRgb565 (rgb565Data);
13411347 }
13421348 else
13431349 {
@@ -1397,7 +1403,11 @@ void DMD::ZeDMDThread()
13971403 }
13981404 }
13991405
1400- if (update) m_pZeDMD->RenderRgb888 (renderBuffer);
1406+ if (update)
1407+ {
1408+ ApplyRoundedCornersRGB24 (renderBuffer, width, height, roundedCorners);
1409+ m_pZeDMD->RenderRgb888 (renderBuffer);
1410+ }
14011411 }
14021412 }
14031413 }
@@ -2081,6 +2091,7 @@ void DMD::PIN2DMDThread()
20812091 Config* const pConfig = Config::GetInstance ();
20822092 bool showNotColorizedFrames = pConfig->IsShowNotColorizedFrames ();
20832093 bool excludeColorizedFrames = pConfig->IsExcludeColorizedFramesForPIN2DMD ();
2094+ const int roundedCorners = pConfig->GetRoundedCorners ();
20842095
20852096 auto scaleToTarget = [&](const uint8_t * src, uint16_t width, uint16_t height, uint8_t * dst) -> bool
20862097 {
@@ -2267,6 +2278,7 @@ void DMD::PIN2DMDThread()
22672278
22682279 if (update && scaleToTarget (rgb24Data, width, height, scaledBuffer))
22692280 {
2281+ ApplyRoundedCornersRGB24 (scaledBuffer, targetWidth, targetHeight, roundedCorners);
22702282 PIN2DMDRenderRaw (targetWidth, targetHeight, scaledBuffer, 1 );
22712283 }
22722284 }
@@ -2292,6 +2304,7 @@ void DMD::PixelcadeDMDThread()
22922304 Config* const pConfig = Config::GetInstance ();
22932305 bool showNotColorizedFrames = pConfig->IsShowNotColorizedFrames ();
22942306 bool excludeColorizedFrames = pConfig->IsExcludeColorizedFramesForPixelcade ();
2307+ const int roundedCorners = pConfig->GetRoundedCorners ();
22952308
22962309 while (true )
22972310 {
@@ -2357,6 +2370,7 @@ void DMD::PixelcadeDMDThread()
23572370
23582371 if (m_pPixelcadeDMD->GetIsV2 ())
23592372 {
2373+ ApplyRoundedCornersRGB24 (scaledBuffer, targetWidth, targetHeight, roundedCorners);
23602374 m_pPixelcadeDMD->UpdateRGB24 (scaledBuffer);
23612375 }
23622376 else
@@ -2476,7 +2490,11 @@ void DMD::PixelcadeDMDThread()
24762490 }
24772491 }
24782492
2479- if (update) m_pPixelcadeDMD->Update (rgb565Data);
2493+ if (update)
2494+ {
2495+ ApplyRoundedCornersRGB565 (rgb565Data, targetWidth, targetHeight, roundedCorners);
2496+ m_pPixelcadeDMD->Update (rgb565Data);
2497+ }
24802498 }
24812499 }
24822500 }
0 commit comments