Fix WIN0H writing with overlapping values

This commit is contained in:
Jeffrey Pfau 2013-09-22 03:00:43 -07:00
parent 4523777bee
commit 2ce017b555
1 changed files with 1 additions and 1 deletions

View File

@ -248,7 +248,7 @@ static uint16_t GBAVideoSoftwareRendererWriteVideoRegister(struct GBAVideoRender
break;
case REG_WIN0H:
softwareRenderer->win0H.packed = value;
if (softwareRenderer->win0H.start >= softwareRenderer->win0H.end || softwareRenderer->win0H.end > VIDEO_HORIZONTAL_PIXELS) {
if (softwareRenderer->win0H.start > softwareRenderer->win0H.end || softwareRenderer->win0H.end > VIDEO_HORIZONTAL_PIXELS) {
softwareRenderer->win0H.end = VIDEO_HORIZONTAL_PIXELS;
}
if (softwareRenderer->win0H.start >= VIDEO_HORIZONTAL_PIXELS) {