mirror of
https://github.com/libretro/Mesen.git
synced 2026-11-07 12:27:58 -10:00
Backport Fixed zapper color detection when grayscale/emphasis flags are enabled
This commit is contained in:
1 parent
222b6243f1
commit
5c81ae829a
1 file changed
+1
-1
+1
-1
@@ -1400,7 +1400,7 @@ uint8_t* PPU::GetSpriteRam()
|
||||
uint32_t PPU::GetPixelBrightness(uint8_t x, uint8_t y)
|
||||
{
|
||||
//Used by Zapper, gives a rough approximation of the brightness level of the specific pixel
|
||||
uint16_t pixelData = _currentOutputBuffer[y << 8 | x];
|
||||
uint16_t pixelData = (_currentOutputBuffer[y << 8 | x] & _paletteRamMask) | _intensifyColorBits;
|
||||
uint32_t argbColor = _settings->GetRgbPalette()[pixelData & 0x3F];
|
||||
return (argbColor & 0xFF) + ((argbColor >> 8) & 0xFF) + ((argbColor >> 16) & 0xFF);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user