mirror of https://github.com/mgba-emu/mgba.git
GBA Video: Make layer disabling work consistently
This commit is contained in:
parent
6c5d30e250
commit
8f7a0e6858
1
CHANGES
1
CHANGES
|
@ -44,6 +44,7 @@ Bugfixes:
|
|||
- GB Video: Fix SCX timing
|
||||
- GBA Video: Improve sprite cycle counting (fixes mgba.io/i/1126)
|
||||
- GB, GBA Savedata: Fix savestate loading overwriting saves on reset
|
||||
- GBA Video: Make layer disabling work consistently
|
||||
Misc:
|
||||
- GBA Timer: Use global cycles for timers
|
||||
- GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
|
||||
|
|
|
@ -722,7 +722,7 @@ static void GBAVideoSoftwareRendererPutPixels(struct GBAVideoRenderer* renderer,
|
|||
}
|
||||
|
||||
static void _enableBg(struct GBAVideoSoftwareRenderer* renderer, int bg, bool active) {
|
||||
if (renderer->d.disableBG[bg] || !active) {
|
||||
if (!active) {
|
||||
renderer->bg[bg].enabled = 0;
|
||||
} else if (!renderer->bg[bg].enabled && active) {
|
||||
if (renderer->nextY == 0) {
|
||||
|
@ -799,6 +799,7 @@ static void GBAVideoSoftwareRendererWriteBLDCNT(struct GBAVideoSoftwareRenderer*
|
|||
}
|
||||
|
||||
#define TEST_LAYER_ENABLED(X) \
|
||||
!renderer->d.disableBG[X] && \
|
||||
(renderer->bg[X].enabled == 4 && \
|
||||
(GBAWindowControlIsBg ## X ## Enable(renderer->currentWindow.packed) || \
|
||||
(GBARegisterDISPCNTIsObjwinEnable(renderer->dispcnt) && GBAWindowControlIsBg ## X ## Enable (renderer->objwin.packed))) && \
|
||||
|
|
Loading…
Reference in New Issue