all repos — mgba @ 2a7b26872886a51111e043451d4b79d53547b5cf

mGBA Game Boy Advance Emulator

GB Video: Fix Windows
Jeffrey Pfau jeffrey@endrift.com
Sun, 14 Feb 2016 11:15:30 -0800
commit

2a7b26872886a51111e043451d4b79d53547b5cf

parent

4360e73d1427312396135125efa45fe9aeb58175

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

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

@@ -123,12 +123,12 @@ }

if (GBRegisterLCDCIsBgEnable(softwareRenderer->lcdc)) { GBVideoSoftwareRendererDrawBackground(softwareRenderer, maps, startX, endX, y, softwareRenderer->scx, softwareRenderer->scy); - if (GBRegisterLCDCIsWindow(softwareRenderer->lcdc) && softwareRenderer->wy <= y && startX >= softwareRenderer->wx - 7) { + if (GBRegisterLCDCIsWindow(softwareRenderer->lcdc) && softwareRenderer->wy <= y && endX >= softwareRenderer->wx - 7) { maps = &softwareRenderer->d.vram[GB_BASE_MAP]; if (GBRegisterLCDCIsWindowTileMap(softwareRenderer->lcdc)) { maps += GB_SIZE_MAP; } - GBVideoSoftwareRendererDrawBackground(softwareRenderer, maps, startX, endX, y, 7 - softwareRenderer->wx, (softwareRenderer->currentWy - y) - softwareRenderer->wy); + GBVideoSoftwareRendererDrawBackground(softwareRenderer, maps, softwareRenderer->wx - 7, endX, y, 7 - softwareRenderer->wx, (softwareRenderer->currentWy - y) - softwareRenderer->wy); } } else { int x;

@@ -165,7 +165,7 @@ if (softwareRenderer->temporaryBuffer) {

mappedMemoryFree(softwareRenderer->temporaryBuffer, GB_VIDEO_HORIZONTAL_PIXELS * GB_VIDEO_VERTICAL_PIXELS * 4); softwareRenderer->temporaryBuffer = 0; } - softwareRenderer->currentWy = 0; + softwareRenderer->currentWy = softwareRenderer->wy; } static void GBVideoSoftwareRendererDrawBackground(struct GBVideoSoftwareRenderer* renderer, uint8_t* maps, int startX, int endX, int y, int sx, int sy) {