all repos — mgba @ f66cf65e5b5cb97638f3c239def9fde56085b724

mGBA Game Boy Advance Emulator

GB Video: Fix regression when disabling window mid-frame (fixes #1394)
Vicki Pfau vi@endrift.com
Mon, 06 May 2019 17:28:32 -0700
commit

f66cf65e5b5cb97638f3c239def9fde56085b724

parent

2775c80d082b19f1a6eb6e61b590beb18a2bc9bc

M src/gb/renderers/software.csrc/gb/renderers/software.c

@@ -502,7 +502,7 @@ int wx = softwareRenderer->wx - 7;

if (GBRegisterLCDCIsWindow(softwareRenderer->lcdc) && wy == y && wx <= endX) { softwareRenderer->hasWindow = true; } - if (softwareRenderer->hasWindow && wx <= endX) { + if (GBRegisterLCDCIsWindow(softwareRenderer->lcdc) && softwareRenderer->hasWindow && wx <= endX) { if (wx > 0 && !softwareRenderer->d.disableBG) { GBVideoSoftwareRendererDrawBackground(softwareRenderer, maps, startX, wx, softwareRenderer->scx - softwareRenderer->offsetScx, softwareRenderer->scy + y - softwareRenderer->offsetScy); }