Skip to content
Snippets Groups Projects
Verified Commit e52fb75d authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

fix: moved attach serial down

To avoid WASM serialization issues.
parent d8b80f0f
No related branches found
No related tags found
1 merge request!23Support for serial data transfer 🔌
Pipeline #2517 failed
...@@ -358,10 +358,6 @@ impl GameBoy { ...@@ -358,10 +358,6 @@ impl GameBoy {
self.apu().set_clock_freq(value); self.apu().set_clock_freq(value);
} }
pub fn attach_serial(&mut self, device: Box<dyn SerialDevice>) {
self.serial().set_device(device);
}
pub fn attach_stdout_serial(&mut self) { pub fn attach_stdout_serial(&mut self) {
self.attach_serial(Box::<StdoutDevice>::default()); self.attach_serial(Box::<StdoutDevice>::default());
} }
...@@ -463,6 +459,10 @@ impl GameBoy { ...@@ -463,6 +459,10 @@ impl GameBoy {
let data = read_file(path); let data = read_file(path);
self.load_rom(&data) self.load_rom(&data)
} }
pub fn attach_serial(&mut self, device: Box<dyn SerialDevice>) {
self.serial().set_device(device);
}
} }
#[cfg(feature = "wasm")] #[cfg(feature = "wasm")]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment