diff --git a/src/core/gba.rs b/src/core/gba.rs index 489399e..502b672 100644 --- a/src/core/gba.rs +++ b/src/core/gba.rs @@ -15,8 +15,6 @@ use super::super::{AudioInterface, InputInterface, VideoInterface}; pub struct GameBoyAdvance { pub sysbus: Box, pub cpu: Core, - video_device: Rc>, - audio_device: Rc>, input_device: Rc>, } @@ -29,14 +27,12 @@ impl GameBoyAdvance { audio_device: Rc>, input_device: Rc>, ) -> GameBoyAdvance { - let gpu = Box::new(Gpu::new(video_device.clone())); - let sound_controller = Box::new(SoundController::new(audio_device.clone())); + let gpu = Box::new(Gpu::new(video_device)); + let sound_controller = Box::new(SoundController::new(audio_device)); let io = IoDevices::new(gpu, sound_controller); GameBoyAdvance { cpu: cpu, sysbus: Box::new(SysBus::new(io, bios_rom, gamepak)), - video_device: video_device, - audio_device: audio_device, input_device: input_device, } }