all repos — mgba @ f08e466fce8798d52687ea390882027e1ee0d880

mGBA Game Boy Advance Emulator

Partially unroll video clearing loop
Jeffrey Pfau jeffrey@endrift.com
Tue, 21 Jan 2014 22:37:08 -0800
commit

f08e466fce8798d52687ea390882027e1ee0d880

parent

52808da265433acce374001bb4a23453e712bd90

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

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

@@ -356,8 +356,11 @@ return;

} int x; - for (x = 0; x < VIDEO_HORIZONTAL_PIXELS; ++x) { + for (x = 0; x < VIDEO_HORIZONTAL_PIXELS; x += 4) { softwareRenderer->spriteLayer[x] = FLAG_UNWRITTEN; + softwareRenderer->spriteLayer[x + 1] = FLAG_UNWRITTEN; + softwareRenderer->spriteLayer[x + 2] = FLAG_UNWRITTEN; + softwareRenderer->spriteLayer[x + 3] = FLAG_UNWRITTEN; } softwareRenderer->windows[0].endX = VIDEO_HORIZONTAL_PIXELS;