Enable layers in non-tile modes.

The current code is very messy as far as GFX goes. There are more
elegant ways of tackling this issue, but they are very difficult with
our current code.

The idea behind this issue is that the backgrounds are not switching
properly for the lcd. So we enable the layers accordingly to
`layerSettings & DISPCNT` on every `CPUUpdateRenderBuffers`.

The bits of `layerSettings` enconde each layer and objs.
We actually only need 2 of these, but I can't do much more here
unsupervised.

- Fix #376.
This commit is contained in:
Edênis Freindorfer Azevedo 2020-01-31 22:40:20 -03:00 committed by Rafael Kitover
parent 213f47ec96
commit ca3b63d64c
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 1 additions and 0 deletions

View File

@ -577,6 +577,7 @@ extern uint32_t line3[240];
void CPUUpdateRenderBuffers(bool force)
{
layerEnable = layerSettings & DISPCNT;
if (!(layerEnable & 0x0100) || force) {
CLEAR_ARRAY(line0);
}