claim and release keyboard to read or Vol/Usb fails

This commit is contained in:
Luke
2020-04-19 09:20:12 +12:00
parent 11206e2209
commit cfddb6077a
2 changed files with 12 additions and 3 deletions

View File

@@ -95,7 +95,7 @@ impl Daemon {
});
// READ KEYBOARD
// TODO: this needs to move to a thread, but there is unsafety
let borrowed_daemon = daemon.borrow();
let mut borrowed_daemon = daemon.borrow_mut();
match borrowed_daemon.rogcore.poll_keyboard(&mut key_buf) {
Ok(read) => {
// Doing this because the Laptop trait takes RogCore, but RogCore contains laptop