- r_clearcolor did not consider that the base palette's alpha is not set.

This commit is contained in:
Christoph Oelckers 2018-04-14 09:33:45 +02:00
parent cef6ddca6e
commit 870890d8cf

View file

@ -107,11 +107,12 @@ namespace swrenderer
}
else
{
uint32_t bgracolor = GPalette.BaseColors[clearcolor].d;
PalEntry bgracolor = GPalette.BaseColors[clearcolor];
bgracolor.a = 255;
int size = viewport->RenderTarget->GetPitch() * viewport->RenderTarget->GetHeight();
uint32_t *dest = (uint32_t *)viewport->RenderTarget->GetPixels();
for (int i = 0; i < size; i++)
dest[i] = bgracolor;
dest[i] = bgracolor.d;
}
}