mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 17:41:33 +11:00
Also for raw copy
This commit is contained in:
parent
ef8b2edc63
commit
5bf78f6274
|
@ -260,8 +260,8 @@ impl<'a> VRamManager<'a> {
|
||||||
|
|
||||||
/// Copies raw palettes to the background palette without any checks.
|
/// Copies raw palettes to the background palette without any checks.
|
||||||
pub fn set_background_palette_raw(&mut self, palette: &[u16]) {
|
pub fn set_background_palette_raw(&mut self, palette: &[u16]) {
|
||||||
for (index, &colour) in palette.iter().enumerate() {
|
unsafe {
|
||||||
PALETTE_BACKGROUND.set(index, colour);
|
dma_copy16(palette.as_ptr(), PALETTE_BACKGROUND.as_ptr(), palette.len());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue