mirror of https://github.com/mgba-emu/mgba.git
GB Video: Ignore CGB attributes when doing SGB VRAM transfers (fixes #2503)
This commit is contained in:
parent
f326d02e33
commit
979be972dc
|
@ -917,7 +917,7 @@ static void GBVideoSoftwareRendererDrawBackground(struct GBVideoSoftwareRenderer
|
||||||
bgTile = ((int8_t*) maps)[topX + topY];
|
bgTile = ((int8_t*) maps)[topX + topY];
|
||||||
}
|
}
|
||||||
int p = highlight ? PAL_HIGHLIGHT_BG : PAL_BG;
|
int p = highlight ? PAL_HIGHLIGHT_BG : PAL_BG;
|
||||||
if (renderer->model >= GB_MODEL_CGB) {
|
if (renderer->model >= GB_MODEL_CGB && renderer->sgbTransfer != 1) {
|
||||||
GBObjAttributes attrs = attr[topX + topY];
|
GBObjAttributes attrs = attr[topX + topY];
|
||||||
p |= GBObjAttributesGetCGBPalette(attrs) * 4;
|
p |= GBObjAttributesGetCGBPalette(attrs) * 4;
|
||||||
if (GBObjAttributesIsPriority(attrs) && GBRegisterLCDCIsBgEnable(renderer->lcdc)) {
|
if (GBObjAttributesIsPriority(attrs) && GBRegisterLCDCIsBgEnable(renderer->lcdc)) {
|
||||||
|
@ -952,7 +952,7 @@ static void GBVideoSoftwareRendererDrawBackground(struct GBVideoSoftwareRenderer
|
||||||
bgTile = ((int8_t*) maps)[topX + topY];
|
bgTile = ((int8_t*) maps)[topX + topY];
|
||||||
}
|
}
|
||||||
int p = highlight ? PAL_HIGHLIGHT_BG : PAL_BG;
|
int p = highlight ? PAL_HIGHLIGHT_BG : PAL_BG;
|
||||||
if (renderer->model >= GB_MODEL_CGB) {
|
if (renderer->model >= GB_MODEL_CGB && renderer->sgbTransfer != 1) {
|
||||||
GBObjAttributes attrs = attr[topX + topY];
|
GBObjAttributes attrs = attr[topX + topY];
|
||||||
p |= GBObjAttributesGetCGBPalette(attrs) * 4;
|
p |= GBObjAttributesGetCGBPalette(attrs) * 4;
|
||||||
if (GBObjAttributesIsPriority(attrs) && GBRegisterLCDCIsBgEnable(renderer->lcdc)) {
|
if (GBObjAttributesIsPriority(attrs) && GBRegisterLCDCIsBgEnable(renderer->lcdc)) {
|
||||||
|
|
Loading…
Reference in New Issue