Skip to content

Commit

Permalink
GB Video: Fix enabling window when LY > WY (fixes #409)
Browse files Browse the repository at this point in the history
  • Loading branch information
endrift committed May 31, 2018
1 parent e7ec349 commit 70c2c80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -3,6 +3,7 @@ Bugfixes:
- GBA Video: Mark OAM dirty on reset (fixes mgba.io/i/1062)
- 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)

0.6.3: (2017-04-14)
Bugfixes:
Expand Down
6 changes: 5 additions & 1 deletion src/gb/renderers/software.c
Expand Up @@ -90,7 +90,11 @@ static void GBVideoSoftwareRendererUpdateWindow(struct GBVideoSoftwareRenderer*
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;
}
Expand Down

0 comments on commit 70c2c80

Please sign in to comment.