DS Video: Fix caputre stride
Vicki Pfau vi@endrift.com
Wed, 12 Apr 2017 14:23:13 -0700
2 files changed,
4 insertions(+),
3 deletions(-)
M
CHANGES
→
CHANGES
@@ -15,6 +15,7 @@ - DS Video: Fix blend bit on windows for 3D layer (fixes mgba.io/i/611)
- DS GX: Hack around writing to a full FIFO that has a swap pending (fixes mgba.io/i/608) - DS Video: Enable overflow bit on extended affine modes - DS Video: Fix extended mode 0 without extended palettes + - DS Video: Fix caputre stride Misc: - DS: Set boot complete bit in RAM on boot (fixes mgba.io/i/576, mgba.io/i/580, mgba.io/i/586) - DS Memory: Ensure DS9 I/O is 8-byte aligned
M
src/ds/video.c
→
src/ds/video.c
@@ -291,13 +291,13 @@ pixel |= (colorA >> 6) & 0x03E0;
pixel |= (colorA >> 3) & 0x001F; #endif pixel |= 0x8000; - STORE_16(pixel, ((x + y * DS_VIDEO_HORIZONTAL_PIXELS) * 2 + base) & 0x1FFFE, vram); + STORE_16(pixel, ((x + y * width) * 2 + base) & 0x1FFFE, vram); } break; case 1: for (x = 0; x < width; ++x) { LOAD_16(pixel, ((x + y * DS_VIDEO_HORIZONTAL_PIXELS) * 2 + readBase) & 0x1FFFE, srcB); - STORE_16(pixel, ((x + y * DS_VIDEO_HORIZONTAL_PIXELS) * 2 + base) & 0x1FFFE, vram); + STORE_16(pixel, ((x + y * width) * 2 + base) & 0x1FFFE, vram); } break; case 2:@@ -336,7 +336,7 @@ }
pixel = (pixel & 0x7C1F) | ((pixel >> 16) & 0x03E0); pixel |= 0x8000; - STORE_16(pixel, ((x + y * DS_VIDEO_HORIZONTAL_PIXELS) * 2 + base) & 0x1FFFE, vram); + STORE_16(pixel, ((x + y * width) * 2 + base) & 0x1FFFE, vram); } break; }