mirror of
https://github.com/SourMesen/Mesen.git
synced 2025-04-02 10:52:48 -04:00
Fix color glitches with soft X scroll (affected mario bros)
This commit is contained in:
parent
1e2c9561b9
commit
1de56c5e2e
1 changed files with 1 additions and 1 deletions
|
@ -414,7 +414,7 @@ void PPU::DrawPixel()
|
|||
uint32_t pixelColor = 0;
|
||||
if(useBackground) {
|
||||
// If we're grabbing the pixel from the high part of the shift register, use the previous tile's palette, not the current one
|
||||
pixelColor = PPU_PALETTE_RGB[GetBGPaletteEntry(offset < 8 ? _previousTile.PaletteOffset : _currentTile.PaletteOffset, backgroundColor)];
|
||||
pixelColor = PPU_PALETTE_RGB[GetBGPaletteEntry(offset + ((_cycle - 1) % 8) < 8 ? _previousTile.PaletteOffset : _currentTile.PaletteOffset, backgroundColor)];
|
||||
} else {
|
||||
pixelColor = PPU_PALETTE_RGB[GetSpritePaletteEntry(_spriteTiles[i].PaletteOffset, spriteColor)];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue