mirror of
https://github.com/SourMesen/Mesen2.git
synced 2025-04-02 10:21:44 -04:00
GBA: Fixed window rendering glitch when X position was changed during hblank
Super Mario Advance 4 (SMB3) window animation when entering a stage had a glitchy scanline when the window's end position was moved from x=255 to x=239 during hblank, because ProcessWindow was not getting called when the window X position register was changed
This commit is contained in:
parent
f359b80eb5
commit
51f5afb7a3
1 changed files with 2 additions and 2 deletions
|
@ -1188,8 +1188,8 @@ void GbaPpu::SetLayerEnabled(int layer, bool enabled)
|
|||
void GbaPpu::WriteRegister(uint32_t addr, uint8_t value)
|
||||
{
|
||||
if(_lastRenderCycle != _state.Cycle && (_state.Scanline < 160 || _state.Scanline == 227)) {
|
||||
if(_state.Cycle < 1006 || addr <= 0x01 || addr == 0x4D) {
|
||||
//Only run renderer during active rendering (< 1006), or if the write could affect sprites
|
||||
if(_state.Cycle < 1006 || addr <= 0x01 || addr == 0x4D || addr >= 0x40 && addr <= 0x43) {
|
||||
//Only run renderer during active rendering (< 1006), or if the write could affect sprites/window processing
|
||||
RenderScanline(true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue