Minor RSYNC fixes.

This commit is contained in:
Christian Speckner 2017-02-09 01:36:47 +01:00
parent fd95231722
commit c0a3a5394d
1 changed files with 4 additions and 3 deletions

View File

@ -997,15 +997,16 @@ void TIA::tickHframe()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIA::applyRsync()
{
const Int32 x = myHctr - 68;
const uInt32 x = myHctr > 68 ? myHctr - 68 : 0;
if (x > 0 && myFrameManager.isRendering()) {
myXDelta = x - 157;
if (myFrameManager.isRendering()) {
myXDelta = 157 - x;
memset(myCurrentFrameBuffer.get() + myFrameManager.getY() * 160 + x, 0, 160 - x);
}
myLinesSinceChange = 0;
myHctr = 225;
myHstate = HState::frame;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -