From 50353216725c5d4d2c0ee48776299d525f84e283 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 5 Sep 2004 03:27:57 +0000 Subject: [PATCH] short circuit FixHiddenAlpha for RGB --- stepmania/src/RageSurfaceUtils.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stepmania/src/RageSurfaceUtils.cpp b/stepmania/src/RageSurfaceUtils.cpp index c6e49a4541..bfe0d7dec7 100644 --- a/stepmania/src/RageSurfaceUtils.cpp +++ b/stepmania/src/RageSurfaceUtils.cpp @@ -287,6 +287,10 @@ static void SetAlphaRGB(const RageSurface *img, uint8_t r, uint8_t g, uint8_t b) */ void RageSurfaceUtils::FixHiddenAlpha( RageSurface *img ) { + /* If there are no alpha bits, there's nothing to fix. */ + if( img->format->BitsPerPixel != 8 && img->format->Amask == 0 ) + return; + uint8_t r, g, b; FindAlphaRGB(img, r, g, b, false);