diff --git a/agb/src/display/tiled/map.rs b/agb/src/display/tiled/map.rs index fbe5b698..c1519e4e 100644 --- a/agb/src/display/tiled/map.rs +++ b/agb/src/display/tiled/map.rs @@ -112,22 +112,20 @@ impl RegularMap { self.bg_h_offset().set(self.x_scroll); self.bg_v_offset().set(self.y_scroll); - vram.gc(); - - if !self.tiles_dirty { - return; - } - let screenblock_memory = self.screenblock_memory(); - unsafe { - dma_copy16( - self.tiles.as_ptr() as *const u16, - screenblock_memory, - self.size.num_tiles(), - ); + if self.tiles_dirty { + unsafe { + dma_copy16( + self.tiles.as_ptr() as *const u16, + screenblock_memory, + self.size.num_tiles(), + ); + } } + vram.gc(); + self.tiles_dirty = false; }