This commit is contained in:
2026-02-11 02:30:53 +01:00
parent 1f689bab03
commit d281ad68c2
3 changed files with 36 additions and 9 deletions

View File

@@ -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)?;