diff --git a/src/nba/src/hw/ppu/background.cpp b/src/nba/src/hw/ppu/background.cpp index 8ff870d..891bb28 100644 --- a/src/nba/src/hw/ppu/background.cpp +++ b/src/nba/src/hw/ppu/background.cpp @@ -88,7 +88,7 @@ template void PPU::DrawBackgroundImpl(int cycles) { } } - if(cycle < 1007U) { + if( likely( cycle < 1007U) ){ // affine backgrounds if constexpr(mode == 1 || mode == 2) { const int id = ~(cycle >> 1) & 1; // 0: BG2, 1: BG3 @@ -118,7 +118,7 @@ template void PPU::DrawBackgroundImpl(int cycles) { } // @todo: research mosaic timing and narrow down the BG X/Y timing more precisely. - if(cycle == 1232U) { + else if(cycle == 1232U) { auto& mosaic = mmio.mosaic; if(mmio.vcount < 159) {