aboutsummaryrefslogtreecommitdiff
path: root/src/desktop/window.rs
diff options
context:
space:
mode:
authorAstatin <[email protected]>2025-07-22 23:14:05 +0200
committerAstatin <[email protected]>2025-07-22 23:14:05 +0200
commita5b89a18526a5b56b74f3ced3d0ebe6ad35a4551 (patch)
tree50751e0e5be68f15c666e08cde2496f72dca0a91 /src/desktop/window.rs
parent87092ea395b910c2c40c5e1244ebec51032c064a (diff)
Add headless option
Diffstat (limited to 'src/desktop/window.rs')
-rw-r--r--src/desktop/window.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/desktop/window.rs b/src/desktop/window.rs
index 0d5bd8c..5265fd2 100644
--- a/src/desktop/window.rs
+++ b/src/desktop/window.rs
@@ -20,6 +20,14 @@ const HEIGHT: u32 = 144;
pub type Keys = Arc<Mutex<HashSet<KeyCode>>>;
+pub struct Headless;
+
+impl Window for Headless {
+ fn update(&mut self, _fb: Box<[u32; 160 * 144]>) -> Option<WindowSignal> {
+ None
+ }
+}
+
pub struct DesktopWindow {
fb_send: Sender<Box<[u32; 160 * 144]>>,
signal_recv: Receiver<WindowSignal>,