all repos — mgba @ ebe543e482699a068d34f53466aec433fa8ba1fc

mGBA Game Boy Advance Emulator

GBA Video: Fix another window bug with windows going too far
Jeffrey Pfau jeffrey@endrift.com
Sat, 22 Nov 2014 23:22:40 -0800
commit

ebe543e482699a068d34f53466aec433fa8ba1fc

parent

89f7a69f3a000bfa8c0e1cfb4a84f71ad5c940d2

1 files changed, 12 insertions(+), 0 deletions(-)

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

@@ -269,6 +269,9 @@ softwareRenderer->winN[0].h.start = 0;

} if (softwareRenderer->winN[0].h.end > VIDEO_HORIZONTAL_PIXELS) { softwareRenderer->winN[0].h.end = VIDEO_HORIZONTAL_PIXELS; + if (softwareRenderer->winN[0].h.start > VIDEO_HORIZONTAL_PIXELS) { + softwareRenderer->winN[0].h.start = VIDEO_HORIZONTAL_PIXELS; + } } break; case REG_WIN1H:

@@ -279,6 +282,9 @@ softwareRenderer->winN[1].h.start = 0;

} if (softwareRenderer->winN[1].h.end > VIDEO_HORIZONTAL_PIXELS) { softwareRenderer->winN[1].h.end = VIDEO_HORIZONTAL_PIXELS; + if (softwareRenderer->winN[1].h.start > VIDEO_HORIZONTAL_PIXELS) { + softwareRenderer->winN[1].h.start = VIDEO_HORIZONTAL_PIXELS; + } } break; case REG_WIN0V:

@@ -289,6 +295,9 @@ softwareRenderer->winN[0].v.start = 0;

} if (softwareRenderer->winN[0].v.end > VIDEO_VERTICAL_PIXELS) { softwareRenderer->winN[0].v.end = VIDEO_VERTICAL_PIXELS; + if (softwareRenderer->winN[0].v.start > VIDEO_VERTICAL_PIXELS) { + softwareRenderer->winN[0].v.start = VIDEO_VERTICAL_PIXELS; + } } break; case REG_WIN1V:

@@ -299,6 +308,9 @@ softwareRenderer->winN[1].v.start = 0;

} if (softwareRenderer->winN[1].v.end > VIDEO_VERTICAL_PIXELS) { softwareRenderer->winN[1].v.end = VIDEO_VERTICAL_PIXELS; + if (softwareRenderer->winN[1].v.start > VIDEO_VERTICAL_PIXELS) { + softwareRenderer->winN[1].v.start = VIDEO_VERTICAL_PIXELS; + } } break; case REG_WININ: