all repos — mgba @ 5a685558c72bd113dd6d80145b9b623fe304155b

mGBA Game Boy Advance Emulator

Window respects y coordinate now
Jeffrey Pfau jeffrey@endrift.com
Tue, 30 Jul 2013 21:39:25 -0700
commit

5a685558c72bd113dd6d80145b9b623fe304155b

parent

453939fc8d143c2eea846bab23c6f5d3d9cd72b8

1 files changed, 2 insertions(+), 2 deletions(-)

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

@@ -327,7 +327,7 @@ softwareRenderer->windows[0].endX = VIDEO_HORIZONTAL_PIXELS;

softwareRenderer->nWindows = 1; if (softwareRenderer->dispcnt.win0Enable || softwareRenderer->dispcnt.win1Enable) { softwareRenderer->windows[0].control = softwareRenderer->winout; - if (softwareRenderer->dispcnt.win1Enable) { + if (softwareRenderer->dispcnt.win1Enable && y < softwareRenderer->win1V.end && y >= softwareRenderer->win1V.start) { if (softwareRenderer->win1H.start > 0) { softwareRenderer->windows[softwareRenderer->nWindows].control = softwareRenderer->win1; softwareRenderer->windows[softwareRenderer->nWindows].endX = softwareRenderer->win1H.start;

@@ -345,7 +345,7 @@ } else {

softwareRenderer->windows[softwareRenderer->nWindows - 1].endX = softwareRenderer->win1H.end; } } - if (softwareRenderer->dispcnt.win0Enable) { + if (softwareRenderer->dispcnt.win0Enable && y < softwareRenderer->win0V.end && y >= softwareRenderer->win0V.start) { int activeWindow; int startX = 0; for (activeWindow = 0; activeWindow < softwareRenderer->nWindows; ++activeWindow) {