diff --git a/src/gba/renderers/video-software.c b/src/gba/renderers/video-software.c index 82648bae6..29d28afdd 100644 --- a/src/gba/renderers/video-software.c +++ b/src/gba/renderers/video-software.c @@ -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) {