mirror of https://github.com/mgba-emu/mgba.git
Fix setting window sizes to 0xFFFF from actually making a window
This commit is contained in:
parent
3ee3f7625f
commit
78bd884a05
|
@ -259,7 +259,7 @@ static uint16_t GBAVideoSoftwareRendererWriteVideoRegister(struct GBAVideoRender
|
||||||
break;
|
break;
|
||||||
case REG_WIN0H:
|
case REG_WIN0H:
|
||||||
softwareRenderer->winN[0].h.packed = value;
|
softwareRenderer->winN[0].h.packed = value;
|
||||||
if (softwareRenderer->winN[0].h.start > VIDEO_HORIZONTAL_PIXELS) {
|
if (softwareRenderer->winN[0].h.start > VIDEO_HORIZONTAL_PIXELS && softwareRenderer->winN[0].h.start != softwareRenderer->winN[0].h.end) {
|
||||||
softwareRenderer->winN[0].h.start = 0;
|
softwareRenderer->winN[0].h.start = 0;
|
||||||
}
|
}
|
||||||
if (softwareRenderer->winN[0].h.start > softwareRenderer->winN[0].h.end || softwareRenderer->winN[0].h.end > VIDEO_HORIZONTAL_PIXELS) {
|
if (softwareRenderer->winN[0].h.start > softwareRenderer->winN[0].h.end || softwareRenderer->winN[0].h.end > VIDEO_HORIZONTAL_PIXELS) {
|
||||||
|
@ -268,7 +268,7 @@ static uint16_t GBAVideoSoftwareRendererWriteVideoRegister(struct GBAVideoRender
|
||||||
break;
|
break;
|
||||||
case REG_WIN1H:
|
case REG_WIN1H:
|
||||||
softwareRenderer->winN[1].h.packed = value;
|
softwareRenderer->winN[1].h.packed = value;
|
||||||
if (softwareRenderer->winN[1].h.start > VIDEO_HORIZONTAL_PIXELS) {
|
if (softwareRenderer->winN[1].h.start > VIDEO_HORIZONTAL_PIXELS && softwareRenderer->winN[1].h.start != softwareRenderer->winN[1].h.end) {
|
||||||
softwareRenderer->winN[1].h.start = 0;
|
softwareRenderer->winN[1].h.start = 0;
|
||||||
}
|
}
|
||||||
if (softwareRenderer->winN[1].h.start > softwareRenderer->winN[1].h.end || softwareRenderer->winN[1].h.end > VIDEO_HORIZONTAL_PIXELS) {
|
if (softwareRenderer->winN[1].h.start > softwareRenderer->winN[1].h.end || softwareRenderer->winN[1].h.end > VIDEO_HORIZONTAL_PIXELS) {
|
||||||
|
@ -277,7 +277,7 @@ static uint16_t GBAVideoSoftwareRendererWriteVideoRegister(struct GBAVideoRender
|
||||||
break;
|
break;
|
||||||
case REG_WIN0V:
|
case REG_WIN0V:
|
||||||
softwareRenderer->winN[0].v.packed = value;
|
softwareRenderer->winN[0].v.packed = value;
|
||||||
if (softwareRenderer->winN[0].v.start > VIDEO_VERTICAL_PIXELS) {
|
if (softwareRenderer->winN[0].v.start > VIDEO_VERTICAL_PIXELS && softwareRenderer->winN[0].v.start != softwareRenderer->winN[0].v.end) {
|
||||||
softwareRenderer->winN[0].v.start = 0;
|
softwareRenderer->winN[0].v.start = 0;
|
||||||
}
|
}
|
||||||
if (softwareRenderer->winN[0].v.start > softwareRenderer->winN[0].v.end || softwareRenderer->winN[0].v.end > VIDEO_HORIZONTAL_PIXELS) {
|
if (softwareRenderer->winN[0].v.start > softwareRenderer->winN[0].v.end || softwareRenderer->winN[0].v.end > VIDEO_HORIZONTAL_PIXELS) {
|
||||||
|
@ -286,7 +286,7 @@ static uint16_t GBAVideoSoftwareRendererWriteVideoRegister(struct GBAVideoRender
|
||||||
break;
|
break;
|
||||||
case REG_WIN1V:
|
case REG_WIN1V:
|
||||||
softwareRenderer->winN[1].v.packed = value;
|
softwareRenderer->winN[1].v.packed = value;
|
||||||
if (softwareRenderer->winN[1].v.start > VIDEO_VERTICAL_PIXELS) {
|
if (softwareRenderer->winN[1].v.start > VIDEO_VERTICAL_PIXELS && softwareRenderer->winN[1].v.start != softwareRenderer->winN[1].v.end) {
|
||||||
softwareRenderer->winN[1].v.start = 0;
|
softwareRenderer->winN[1].v.start = 0;
|
||||||
}
|
}
|
||||||
if (softwareRenderer->winN[1].v.start > softwareRenderer->winN[1].v.end || softwareRenderer->winN[1].v.end > VIDEO_HORIZONTAL_PIXELS) {
|
if (softwareRenderer->winN[1].v.start > softwareRenderer->winN[1].v.end || softwareRenderer->winN[1].v.end > VIDEO_HORIZONTAL_PIXELS) {
|
||||||
|
|
Loading…
Reference in New Issue