all repos — mgba @ db8bb29c5a7b7efcd4d086ee383870a2565792e2

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

db8bb29c5a7b7efcd4d086ee383870a2565792e2

parent

af35438aaab9307f0451f358a678644d4d9336ba

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

@@ -508,7 +508,7 @@ int wx = softwareRenderer->wx + softwareRenderer->currentWx - 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); }