mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 17:41:33 +11:00
Correctly remove dynamic tiles if not committing a text renderer
This commit is contained in:
parent
dc4ccee451
commit
d56e4d5888
|
@ -161,3 +161,13 @@ impl<'a> TextRenderer<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a> Drop for TextRenderer<'a> {
|
||||||
|
fn drop(&mut self) {
|
||||||
|
let tiles = core::mem::take(&mut self.tiles);
|
||||||
|
|
||||||
|
for (_, tile) in tiles.into_iter() {
|
||||||
|
self.vram_manager.remove_dynamic_tile(tile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue