chore: move ppu vram from stack to heap
This commit is contained in:
parent
fb0772c671
commit
8048495cbc
|
@ -1,5 +1,3 @@
|
||||||
use crate::ppu;
|
|
||||||
|
|
||||||
use super::cartridge::Cartridge;
|
use super::cartridge::Cartridge;
|
||||||
use super::ppu::PPU;
|
use super::ppu::PPU;
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct PPU {
|
pub struct PPU {
|
||||||
lcdc: LCDControl,
|
lcdc: LCDControl,
|
||||||
pub vram: [u8; 8192],
|
pub vram: Box<[u8]>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for PPU {
|
impl Default for PPU {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
lcdc: Default::default(),
|
lcdc: Default::default(),
|
||||||
vram: [0; 8192],
|
vram: vec![0; 8192].into_boxed_slice(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue