all repos — mgba @ 43e5aa698afab3c97121b6ebb4a2e10fd394d483

mGBA Game Boy Advance Emulator

Fix modes 3 and 5 after vram load refactor
Jeffrey Pfau jeffrey@endrift.com
Wed, 01 Oct 2014 23:30:26 -0700
commit

43e5aa698afab3c97121b6ebb4a2e10fd394d483

parent

fb10622946fa8d8744134ac4b0e16c0a1eb111d8

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

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

@@ -1348,7 +1348,7 @@ uint32_t* pixel;

for (outX = renderer->start, pixel = &renderer->row[outX]; outX < renderer->end; ++outX, ++pixel) { BACKGROUND_BITMAP_ITERATE(VIDEO_HORIZONTAL_PIXELS, VIDEO_VERTICAL_PIXELS); - LOAD_16(color, (localX >> 8) + (localY >> 8) * VIDEO_HORIZONTAL_PIXELS << 1, renderer->d.vram); + LOAD_16(color, ((localX >> 8) + (localY >> 8) * VIDEO_HORIZONTAL_PIXELS) << 1, renderer->d.vram); #ifndef COLOR_16_BIT unsigned color32; color32 = 0;

@@ -1413,7 +1413,7 @@ uint32_t* pixel;

for (outX = renderer->start, pixel = &renderer->row[outX]; outX < renderer->end; ++outX, ++pixel) { BACKGROUND_BITMAP_ITERATE(160, 128); - LOAD_16(color, offset + (localX >> 8) + (localY >> 8) * 320, renderer->d.vram); + LOAD_16(color, (offset + (localX >> 8) + (localY >> 8) * 160) << 1, renderer->d.vram); #ifndef COLOR_16_BIT unsigned color32 = 0; color32 |= (color << 9) & 0xF80000;