all repos — mgba @ 9253eeba2317fe5d9e8ee30d78e020572d4899e5

mGBA Game Boy Advance Emulator

Optimize range check in mode 2 rendering
Jeffrey Pfau jeffrey@endrift.com
Tue, 05 Nov 2013 01:21:13 -0800
commit

9253eeba2317fe5d9e8ee30d78e020572d4899e5

parent

53515b41cdfab0b5f9dcaff97c03b1495d24603a

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -1056,7 +1056,7 @@

if (background->overflow) { localX = x & (sizeAdjusted - 1); localY = y & (sizeAdjusted - 1); - } else if (x < 0 || y < 0 || x >= sizeAdjusted || y >= sizeAdjusted) { + } else if ((x | y) & ~(sizeAdjusted - 1)) { continue; } else { localX = x;