all repos — mgba @ f26982e0139b313b670b82becb5e54cb87b05341

mGBA Game Boy Advance Emulator

GBA Video: Fix scanline parameters not advancing for clean scanlines (fixes #837)
Vicki Pfau vi@endrift.com
Wed, 02 Aug 2017 22:15:32 -0700
commit

f26982e0139b313b670b82becb5e54cb87b05341

parent

ec25074cec84c82e4105a6b84e8779b1cf3a937e

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

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

@@ -542,6 +542,12 @@ static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* renderer, int y) {

struct GBAVideoSoftwareRenderer* softwareRenderer = (struct GBAVideoSoftwareRenderer*) renderer; if (!(softwareRenderer->scanlineDirty[y >> 5] & (1 << (y & 0x1F)))) { + if (GBARegisterDISPCNTGetMode(softwareRenderer->dispcnt) != 0) { + softwareRenderer->bg[2].sx += softwareRenderer->bg[2].dmx; + softwareRenderer->bg[2].sy += softwareRenderer->bg[2].dmy; + softwareRenderer->bg[3].sx += softwareRenderer->bg[3].dmx; + softwareRenderer->bg[3].sy += softwareRenderer->bg[3].dmy; + } return; }