From 27570289dbeab2ac5cc58ac6316b374793666e3a Mon Sep 17 00:00:00 2001 From: root <182859762@qq.com> Date: Mon, 13 May 2024 00:40:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=BE=E5=88=B0=E4=B8=80=E4=B8=AA=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0likely=E7=9A=84=E5=9C=B0=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/nba/src/hw/ppu/background.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {