From 63e76f29cc1d018f78e7b357b7cba14904bb4f07 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 5 Feb 2019 18:09:07 -0600 Subject: [PATCH] Use opaque white instead of just opaque for the marker pixel, so transparent GIFs aren't needed when markers aren't being used. --- sdk/Windows/SMXPanelAnimation.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sdk/Windows/SMXPanelAnimation.cpp b/sdk/Windows/SMXPanelAnimation.cpp index 3826f26..31c4b9d 100644 --- a/sdk/Windows/SMXPanelAnimation.cpp +++ b/sdk/Windows/SMXPanelAnimation.cpp @@ -303,10 +303,11 @@ void SMXPanelAnimation::Load(const vector &frames, int pane { const SMXGif::SMXGifFrame &gif_frame = frames[frame_no]; - // If the bottom-left pixel is opaque, this is the loop frame, which marks the + // If the bottom-left pixel is white, this is the loop frame, which marks the // frame the animation should start at after a loop. This is global to the // animation, not specific to each panel. - if(gif_frame.frame.get(0, gif_frame.frame.height-1).color[3] != 0) + SMXGif::Color marker = gif_frame.frame.get(0, gif_frame.frame.height-1); + if(marker.color[3] == 0xFF && marker.color[0] >= 0x80) { // We shouldn't see more than one of these. If we do, use the first. if(m_iLoopFrame != -1)