Skip to content

Commit

Permalink
refactor disp (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
sevonj authored Dec 29, 2023
1 parent 13d3d6c commit 1197d58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/emulator/devices/dev_display_classic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub(crate) struct DevDisplayClassic {
/// Interrupt signal
pub(crate) interrupt: bool,
}

impl Default for DevDisplayClassic {
fn default() -> Self {
Self {
Expand All @@ -25,6 +26,7 @@ impl Default for DevDisplayClassic {
}
}
}

impl Device for DevDisplayClassic {
fn reset(&mut self) {
self.framebuffer = vec![image::Rgba([0, 0, 0, 255,]); 120 * 160];
Expand All @@ -46,7 +48,7 @@ impl DevDisplayClassic {
pub(crate) fn send(&mut self) {
self.interrupt = true;
if let Some(tx) = &self.tx {
tx.send(self.framebuffer.clone());
let _ = tx.send(self.framebuffer.clone());
}
}
}
Expand Down

0 comments on commit 1197d58

Please sign in to comment.