all repos — mgba @ ed99f8b9257e407a6b3a1191af4360d221d812e2

mGBA Game Boy Advance Emulator

GB Video: Fix enabling window when LY > WY (fixes #409)
Vicki Pfau vi@endrift.com
Sun, 20 May 2018 12:56:57 -0700
commit

ed99f8b9257e407a6b3a1191af4360d221d812e2

parent

bc88f2369282b078ce011bf6c625ccc8693dcf89

M CHANGESCHANGES

@@ -32,6 +32,7 @@ - GB Audio: Clock frame events on DIV

- GBA Timer: Fix timers sometimes being late (fixes mgba.io/i/1012) - GBA Hardware: Fix RTC overriding light sensor (fixes mgba.io/i/1069) - GBA Savedata: Fix savedata modified time updating when read-only + - GB Video: Fix enabling window when LY > WY (fixes mgba.io/i/409) Misc: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
M src/gb/renderers/software.csrc/gb/renderers/software.c

@@ -229,7 +229,11 @@ renderer->currentWy -= renderer->lastY;

renderer->hasWindow = true; } else { if (!renderer->hasWindow) { - renderer->currentWy = renderer->lastY - renderer->wy; + if (renderer->lastY > renderer->wy) { + renderer->currentWy = GB_VIDEO_VERTICAL_PIXELS; + } else { + renderer->currentWy = renderer->lastY - renderer->wy; + } } else { renderer->currentWy += renderer->lastY; }