mirror of https://github.com/stella-emu/stella.git
added check which ignores invalid frames (too many scanlines) during frame detection (fixes Tarzan)
This commit is contained in:
parent
2a09855224
commit
b246dcb2cf
|
@ -181,12 +181,14 @@ void FrameLayoutDetector::onNextLine()
|
|||
if (myCurrentFrameTotalLines > frameLines - 3 || myTotalFrames == 0)
|
||||
++myLinesWaitingForVsyncToStart;
|
||||
|
||||
if (myLinesWaitingForVsyncToStart > Metrics::waitForVsync) setState(State::waitForVsyncEnd);
|
||||
if (myLinesWaitingForVsyncToStart > Metrics::waitForVsync)
|
||||
setState(State::waitForVsyncEnd);
|
||||
|
||||
break;
|
||||
|
||||
case State::waitForVsyncEnd:
|
||||
if (++myLinesWaitingForVsyncToStart > Metrics::waitForVsync) setState(State::waitForVsyncStart);
|
||||
if (++myLinesWaitingForVsyncToStart > Metrics::waitForVsync)
|
||||
setState(State::waitForVsyncStart);
|
||||
|
||||
break;
|
||||
|
||||
|
@ -232,7 +234,10 @@ void FrameLayoutDetector::finalizeFrame()
|
|||
{
|
||||
notifyFrameComplete();
|
||||
|
||||
if (myTotalFrames <= Metrics::initialGarbageFrames) return;
|
||||
if (myTotalFrames <= Metrics::initialGarbageFrames)
|
||||
return;
|
||||
if (myCurrentFrameFinalLines > Metrics::frameLinesPAL + Metrics::waitForVsync)
|
||||
return;
|
||||
|
||||
// Calculate how close a frame is to PAL and NTSC based on scanlines. An odd scanline count
|
||||
// results into a penalty of 0.5 for PAL. The result is between 0.0 (<=262 scanlines) and
|
||||
|
|
Loading…
Reference in New Issue