mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 00:01:34 +11:00
Don't use DMA outside of the eeprom case
This commit is contained in:
parent
eaf5a83076
commit
43718773d7
|
@ -5,7 +5,6 @@ use crate::bitarray::Bitarray;
|
|||
use crate::display::affine::AffineMatrixBackground;
|
||||
use crate::display::tile_data::TileData;
|
||||
use crate::display::{Priority, DISPLAY_CONTROL};
|
||||
use crate::dma::dma_copy16;
|
||||
use crate::fixnum::Vector2D;
|
||||
use crate::memory_mapped::MemoryMapped;
|
||||
|
||||
|
@ -93,9 +92,8 @@ where
|
|||
|
||||
if *self.tiles_dirty() {
|
||||
unsafe {
|
||||
dma_copy16(
|
||||
screenblock_memory.copy_from(
|
||||
self.tiles_mut().as_ptr() as *const u16,
|
||||
screenblock_memory,
|
||||
self.map_size().num_tiles(),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ use alloc::{slice, vec::Vec};
|
|||
use crate::{
|
||||
agb_alloc::{block_allocator::BlockAllocator, bump_allocator::StartEnd},
|
||||
display::palette16,
|
||||
dma::dma_copy16,
|
||||
hash_map::{Entry, HashMap},
|
||||
memory_mapped::MemoryMapped1DArray,
|
||||
};
|
||||
|
@ -413,7 +412,9 @@ impl VRamManager {
|
|||
/// Copies raw palettes to the background palette without any checks.
|
||||
pub fn set_background_palette_raw(&mut self, palette: &[u16]) {
|
||||
unsafe {
|
||||
dma_copy16(palette.as_ptr(), PALETTE_BACKGROUND.as_ptr(), palette.len());
|
||||
PALETTE_BACKGROUND
|
||||
.as_ptr()
|
||||
.copy_from_nonoverlapping(palette.as_ptr(), palette.len());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue