Input!
This commit is contained in:
@@ -33,7 +33,6 @@ pub struct State {
|
||||
pub x: i32,
|
||||
pub y: i32,
|
||||
pub buttons: Buttons,
|
||||
pub previous_buttons: Buttons,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Default)]
|
||||
@@ -120,7 +119,6 @@ impl G13 {
|
||||
pub fn read(&self) -> Result<State, Box<dyn std::error::Error>> {
|
||||
let mut state = self.state();
|
||||
|
||||
state.previous_buttons = state.buttons;
|
||||
let mut reader = self.interface.endpoint::<Interrupt, In>(0x81)?.reader(8);
|
||||
let mut buf = [0; 8];
|
||||
reader.read_exact(&mut buf)?;
|
||||
|
||||
Reference in New Issue
Block a user