chore: move ppu vram from stack to heap

This commit is contained in:
Rekai Nyangadzayi Musuka 2021-01-02 23:58:49 -06:00 committed by Rekai Musuka
parent fb0772c671
commit 8048495cbc
2 changed files with 2 additions and 4 deletions

View File

@ -1,5 +1,3 @@
use crate::ppu;
use super::cartridge::Cartridge;
use super::ppu::PPU;
#[derive(Debug, Clone)]

View File

@ -1,14 +1,14 @@
#[derive(Debug, Clone)]
pub struct PPU {
lcdc: LCDControl,
pub vram: [u8; 8192],
pub vram: Box<[u8]>,
}
impl Default for PPU {
fn default() -> Self {
Self {
lcdc: Default::default(),
vram: [0; 8192],
vram: vec![0; 8192].into_boxed_slice(),
}
}
}