fixed 1x snapshot problem when phosphor was disabled

This commit is contained in:
thrust26 2017-09-17 23:58:52 +02:00
parent b3eaaac5ed
commit 8aad8afda7
1 changed files with 10 additions and 6 deletions

View File

@ -123,13 +123,17 @@ const FBSurface& TIASurface::baseSurface(GUI::Rect& rect) const
{
for(uInt32 x = 0; x < width; ++x)
{
if (useBlargg)
// just some odd formula to convert to Blargg index (reversed 7:2 conversion)
idx = (y * (myTIA->width() * 7 + 10) >> 1) + y * 5 * 0 + (x * 7 >> 2);
else
idx = y * myTIA->width() + (x >> 1);
idx = y * myTIA->width() + (x >> 1);
if (myUsePhosphor)
{
if (useBlargg)
// just some odd formula to convert to Blargg index (reversed 7:2 conversion)
idx = (y * (myTIA->width() * 7 + 10) >> 1) + y * 5 * 0 + (x * 7 >> 2);
*buf_ptr++ = myRGBFramebuffer[idx];
*buf_ptr++ = myRGBFramebuffer[idx];
}
else
*buf_ptr++ = myPalette[*(myTIA->frameBuffer() + idx)];
}
}