Don't update background scanline params in mode 0

Noticed that an issue with Rayman 3 Hoodlum Havoc was reported on one of the gpsp compatability lists.  Cross-checked against mgba and revealed the same issue reported as being present in an earlier version -

https://github.com/mgba-emu/mgba/issues/377

This PR applies the same fix as used in mgba.  Could affect other games also.
This commit is contained in:
andymcca 2023-07-27 15:35:27 +01:00 committed by David G. F
parent 0db43d6683
commit 30e86961a1
1 changed files with 8 additions and 5 deletions

View File

@ -4530,11 +4530,14 @@ void update_scanline(void)
render_scanline_bitmap(screen_offset, dispcnt);
}
}
// Don't update background scanline params in mode 0
if(video_mode != 0)
{
affine_reference_x[0] += (s16)read_ioreg(REG_BG2PB);
affine_reference_y[0] += (s16)read_ioreg(REG_BG2PD);
affine_reference_x[1] += (s16)read_ioreg(REG_BG3PB);
affine_reference_y[1] += (s16)read_ioreg(REG_BG3PD);
}
}