mirror of https://github.com/mgba-emu/mgba.git
Update variant palettes when writing to palette
This commit is contained in:
parent
03361f20a2
commit
40e9a7ef26
|
@ -194,6 +194,11 @@ static void GBAVideoSoftwareRendererWritePalette(struct GBAVideoRenderer* render
|
||||||
color32 |= (value << 6) & 0xF800;
|
color32 |= (value << 6) & 0xF800;
|
||||||
color32 |= (value << 9) & 0xF80000;
|
color32 |= (value << 9) & 0xF80000;
|
||||||
softwareRenderer->normalPalette[address >> 1] = color32;
|
softwareRenderer->normalPalette[address >> 1] = color32;
|
||||||
|
if (softwareRenderer->blendEffect == BLEND_BRIGHTEN) {
|
||||||
|
softwareRenderer->variantPalette[address >> 1] = _brighten(color32, softwareRenderer->bldy);
|
||||||
|
} else if (softwareRenderer->blendEffect == BLEND_DARKEN) {
|
||||||
|
softwareRenderer->variantPalette[address >> 1] = _darken(color32, softwareRenderer->bldy);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* renderer, int y) {
|
static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* renderer, int y) {
|
||||||
|
|
Loading…
Reference in New Issue