clean os/user codes for graph show

This commit is contained in:
Yu Chen 2023-01-07 19:14:20 +08:00
parent f2635c2dba
commit 2dfd195841
6 changed files with 7 additions and 224 deletions

View file

@ -1,8 +1,5 @@
use crate::drivers::bus::virtio::VirtioHal;
use crate::{
gui::{move_rect, reset},
sync::UPIntrFreeCell,
};
use crate::sync::UPIntrFreeCell;
use alloc::sync::Arc;
use core::any::Any;
use virtio_drivers::{VirtIOHeader, VirtIOInput};
@ -49,21 +46,6 @@ impl InputDevice for VirtIOInputWrapper {
virtio_input_decoder::DecodeType::Key(key, r#type) => {
if r#type == KeyType::Press {
match key {
Key::C | Key::MouseLeft => {
reset();
}
Key::W => {
move_rect(0, -10);
}
Key::S => {
move_rect(0, 10);
}
Key::A => {
move_rect(-10, 0);
}
Key::D => {
move_rect(10, 0);
}
_ => {}
}
}