short circuit FixHiddenAlpha for RGB

This commit is contained in:
Glenn Maynard
2004-09-05 03:27:57 +00:00
parent 060e901c10
commit 5035321672
+4
View File
@@ -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);