mirror of https://github.com/mgba-emu/mgba.git
GBA Video: Don't iterate affine backgrounds when disabled
This commit is contained in:
parent
86fe869087
commit
2d4294e417
1
CHANGES
1
CHANGES
|
@ -19,6 +19,7 @@ Emulation fixes:
|
||||||
- GBA Memory: Fix misaligned 32-bit I/O loads (fixes mgba.io/i/2307)
|
- GBA Memory: Fix misaligned 32-bit I/O loads (fixes mgba.io/i/2307)
|
||||||
- GBA SIO: Fix SI value for unattached MULTI mode
|
- GBA SIO: Fix SI value for unattached MULTI mode
|
||||||
- GBA Video: Fix backdrop color if DISPCNT is first set to 0 (fixes mgba.io/i/2260)
|
- GBA Video: Fix backdrop color if DISPCNT is first set to 0 (fixes mgba.io/i/2260)
|
||||||
|
- GBA Video: Don't iterate affine backgrounds when disabled
|
||||||
Other fixes:
|
Other fixes:
|
||||||
- Core: Don't attempt to restore rewind diffs past start of rewind
|
- Core: Don't attempt to restore rewind diffs past start of rewind
|
||||||
- FFmpeg: Don't attempt to use YUV 4:2:0 for lossless videos (fixes mgba.io/i/2084)
|
- FFmpeg: Don't attempt to use YUV 4:2:0 for lossless videos (fixes mgba.io/i/2084)
|
||||||
|
|
|
@ -1433,10 +1433,14 @@ void GBAVideoGLRendererDrawScanline(struct GBAVideoRenderer* renderer, int y) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GBARegisterDISPCNTGetMode(glRenderer->dispcnt) != 0) {
|
if (GBARegisterDISPCNTGetMode(glRenderer->dispcnt) != 0) {
|
||||||
glRenderer->bg[2].affine.sx += glRenderer->bg[2].affine.dmx;
|
if (glRenderer->bg[2].enabled == 4) {
|
||||||
glRenderer->bg[2].affine.sy += glRenderer->bg[2].affine.dmy;
|
glRenderer->bg[2].affine.sx += glRenderer->bg[2].affine.dmx;
|
||||||
glRenderer->bg[3].affine.sx += glRenderer->bg[3].affine.dmx;
|
glRenderer->bg[2].affine.sy += glRenderer->bg[2].affine.dmy;
|
||||||
glRenderer->bg[3].affine.sy += glRenderer->bg[3].affine.dmy;
|
}
|
||||||
|
if (glRenderer->bg[3].enabled == 4) {
|
||||||
|
glRenderer->bg[3].affine.sx += glRenderer->bg[3].affine.dmx;
|
||||||
|
glRenderer->bg[3].affine.sy += glRenderer->bg[3].affine.dmy;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -545,10 +545,14 @@ static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* render
|
||||||
|
|
||||||
if (!dirty) {
|
if (!dirty) {
|
||||||
if (GBARegisterDISPCNTGetMode(softwareRenderer->dispcnt) != 0) {
|
if (GBARegisterDISPCNTGetMode(softwareRenderer->dispcnt) != 0) {
|
||||||
softwareRenderer->bg[2].sx += softwareRenderer->bg[2].dmx;
|
if (softwareRenderer->bg[2].enabled == 4) {
|
||||||
softwareRenderer->bg[2].sy += softwareRenderer->bg[2].dmy;
|
softwareRenderer->bg[2].sx += softwareRenderer->bg[2].dmx;
|
||||||
softwareRenderer->bg[3].sx += softwareRenderer->bg[3].dmx;
|
softwareRenderer->bg[2].sy += softwareRenderer->bg[2].dmy;
|
||||||
softwareRenderer->bg[3].sy += softwareRenderer->bg[3].dmy;
|
}
|
||||||
|
if (softwareRenderer->bg[3].enabled == 4) {
|
||||||
|
softwareRenderer->bg[3].sx += softwareRenderer->bg[3].dmx;
|
||||||
|
softwareRenderer->bg[3].sy += softwareRenderer->bg[3].dmy;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -621,10 +625,14 @@ static void GBAVideoSoftwareRendererDrawScanline(struct GBAVideoRenderer* render
|
||||||
GBAVideoSoftwareRendererPostprocessBuffer(softwareRenderer);
|
GBAVideoSoftwareRendererPostprocessBuffer(softwareRenderer);
|
||||||
|
|
||||||
if (GBARegisterDISPCNTGetMode(softwareRenderer->dispcnt) != 0) {
|
if (GBARegisterDISPCNTGetMode(softwareRenderer->dispcnt) != 0) {
|
||||||
softwareRenderer->bg[2].sx += softwareRenderer->bg[2].dmx;
|
if (softwareRenderer->bg[2].enabled == 4) {
|
||||||
softwareRenderer->bg[2].sy += softwareRenderer->bg[2].dmy;
|
softwareRenderer->bg[2].sx += softwareRenderer->bg[2].dmx;
|
||||||
softwareRenderer->bg[3].sx += softwareRenderer->bg[3].dmx;
|
softwareRenderer->bg[2].sy += softwareRenderer->bg[2].dmy;
|
||||||
softwareRenderer->bg[3].sy += softwareRenderer->bg[3].dmy;
|
}
|
||||||
|
if (softwareRenderer->bg[3].enabled == 4) {
|
||||||
|
softwareRenderer->bg[3].sx += softwareRenderer->bg[3].dmx;
|
||||||
|
softwareRenderer->bg[3].sy += softwareRenderer->bg[3].dmy;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (softwareRenderer->bg[0].enabled > 0 && softwareRenderer->bg[0].enabled < 4) {
|
if (softwareRenderer->bg[0].enabled > 0 && softwareRenderer->bg[0].enabled < 4) {
|
||||||
|
|
Loading…
Reference in New Issue