PPU: Fixed color math regression (fixes SMW)
This commit is contained in:
parent
bd2b9a1132
commit
3205a6bcc2
1 changed files with 3 additions and 4 deletions
|
@ -956,15 +956,14 @@ void Ppu::DrawSubPixel(uint8_t x, uint16_t color)
|
|||
|
||||
void Ppu::ApplyColorMath()
|
||||
{
|
||||
uint8_t activeWindowCount = (uint8_t)_window[0].ActiveLayers[Ppu::ColorWindowIndex] + (uint8_t)_window[1].ActiveLayers[Ppu::ColorWindowIndex];
|
||||
|
||||
if(!_colorMathEnabled || activeWindowCount == 0) {
|
||||
if(!_colorMathEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t activeWindowCount = (uint8_t)_window[0].ActiveLayers[Ppu::ColorWindowIndex] + (uint8_t)_window[1].ActiveLayers[Ppu::ColorWindowIndex];
|
||||
bool hiResMode = _hiResMode || _bgMode == 5 || _bgMode == 6;
|
||||
uint16_t prevMainPixel = 0;
|
||||
int prevX = 0;
|
||||
int prevX = _drawStartX > 0 ? _drawStartX - 1 : 0;
|
||||
|
||||
for(int x = _drawStartX; x <= _drawEndX; x++) {
|
||||
bool isInsideWindow = activeWindowCount && ProcessMaskWindow<Ppu::ColorWindowIndex>(activeWindowCount, x);
|
||||
|
|
Loading…
Add table
Reference in a new issue