Optimize range check in mode 2 rendering
Jeffrey Pfau jeffrey@endrift.com
Tue, 05 Nov 2013 01:21:13 -0800
1 files changed,
1 insertions(+),
1 deletions(-)
M
src/gba/renderers/video-software.c
→
src/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;