From c682dd1c27ff5f1c4facd533ff74c4cfe29476fd Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Sun, 17 Sep 2017 14:12:14 +0200 Subject: [PATCH] Microoptimization: avoid function dispatch overhead. --- src/emucore/tia/TIA.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/emucore/tia/TIA.cxx b/src/emucore/tia/TIA.cxx index 250304ca4..4d8ecf2b0 100644 --- a/src/emucore/tia/TIA.cxx +++ b/src/emucore/tia/TIA.cxx @@ -1153,7 +1153,7 @@ void TIA::cycle(uInt32 colorClocks) else tickHframe(); - if (myCollisionUpdateRequired) updateCollision(); + if (myCollisionUpdateRequired && !myFrameManager.vblank()) updateCollision(); } if (++myHctr >= 228) @@ -1271,8 +1271,6 @@ void TIA::cloneLastLine() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void TIA::updateCollision() { - if (myFrameManager.vblank()) return; - myCollisionMask |= ( myPlayer0.collision & myPlayer1.collision &