diff --git a/virtio-gpud/patches/01-orbital.patch b/virtio-gpud/patches/01-orbital.patch index 493ec66735..0dc1b7c6dd 100644 --- a/virtio-gpud/patches/01-orbital.patch +++ b/virtio-gpud/patches/01-orbital.patch @@ -1,3 +1,48 @@ +diff --git a/src/core/mod.rs b/src/core/mod.rs +index 85337dd..a454579 100644 +--- a/src/core/mod.rs ++++ b/src/core/mod.rs +@@ -160,6 +160,9 @@ pub struct Orbital { + pub todo: Vec, + pub displays: Vec, + pub maps: BTreeMap, ++ ++ /// Handle to "input:consumer" to recieve input events. ++ pub input: File, + } + + impl Orbital { +@@ -259,6 +262,7 @@ impl Orbital { + todo: Vec::new(), + displays, + maps: BTreeMap::new(), ++ input: File::open("input:consumer")?, + }) + } + +@@ -294,6 +298,7 @@ impl Orbital { + + let scheme_fd = self.scheme.as_raw_fd(); + let display_fd = self.displays[0].file.as_raw_fd(); ++ let input_fd = self.input.as_raw_fd(); + + handler.handle_startup(&mut self)?; + +@@ -337,12 +342,12 @@ impl Orbital { + Ok(result) + })?; + +- event_queue.add(display_fd, move |_| -> io::Result> { ++ event_queue.add(input_fd, move |_| -> io::Result> { + let mut me = me2.borrow_mut(); + let me = &mut *me; + let mut events = [Event::new(); 16]; + loop { +- match read_to_slice(&mut me.orb.displays[0].file, &mut events)? { ++ match read_to_slice(&mut me.orb.input, &mut events)? { + 0 => break, + count => { + let events = &mut events[..count]; diff --git a/src/main.rs b/src/main.rs index 1cdf9cf..3859ac0 100644 --- a/src/main.rs diff --git a/virtio-gpud/src/scheme.rs b/virtio-gpud/src/scheme.rs index 0dbec3326f..f7d906cced 100644 --- a/virtio-gpud/src/scheme.rs +++ b/virtio-gpud/src/scheme.rs @@ -6,7 +6,6 @@ use std::{ }, }; -use orbclient::Event; use syscall::{Dma, Error as SysError, SchemeMut, EINVAL, EPERM}; use virtio_core::{ spec::{Buffer, ChainBuilder, DescriptorFlags},