Minor refactoring, be more tolerant w.r.t. vsync timings -> fixes Acid Drop.

This commit is contained in:
Christian Speckner 2017-10-17 22:24:40 +02:00
parent 20c21177ea
commit 86e789a6cf
3 changed files with 3 additions and 5 deletions

View File

@ -1116,7 +1116,7 @@ void TIA::onFrameStart()
{
// Only activate it when necessary, since changing colours in
// the graphical object forces the TIA cached line to be flushed
if (myFrameManager->scanlineCountTransitioned())
if (myFrameManager->scanlineParityChanged())
{
myColorLossActive = myFrameManager->scanlinesLastFrame() & 0x1;

View File

@ -92,10 +92,8 @@ class AbstractFrameManager : public Serializable
/**
* Did the number of scanlines switch between even / odd (used for color loss
* emulation).
*
* TODO: Crappy name, find something better.
*/
bool scanlineCountTransitioned() const {
bool scanlineParityChanged() const {
return (myPreviousFrameFinalLines & 0x1) != (myCurrentFrameFinalLines & 0x1);
}

View File

@ -29,7 +29,7 @@ enum Metrics: uInt32 {
overscanNTSC = 30,
overscanPAL = 36,
vsync = 3,
maxLinesVsync = 32,
maxLinesVsync = 50,
visibleOverscan = 20,
tvModeDetectionTolerance = 20,
initialGarbageFrames = TIAConstants::initialGarbageFrames,