Skip to content

Commit

Permalink
Steam Deck: Attempt to guess an USB issue to fix #54
Browse files Browse the repository at this point in the history
  • Loading branch information
C0rn3j committed Oct 28, 2024
1 parent b57ba35 commit 0d31521
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scc/drivers/steamdeck.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ def on_serial_got(self):
self._id = f"deck{self._serial}"
self.set_input_interrupt(ENDPOINT, 64, self._on_input)

def _on_input(self, endpoint, data):
def _on_input(self, endpoint: int, data: bytearray) -> None:
if not self._ready:
self.daemon.add_controller(self)
self.configure()
self._ready = True

self._old_state, self._input = self._input, self._old_state
ctypes.memmove(ctypes.addressof(self._input), data, len(data))
ctypes.memmove(ctypes.addressof(self._input), bytes(data), len(data))
if self._input.seq % UNLIZARD_INTERVAL == 0:
# Keeps lizard mode from happening
self.clear_mappings()
Expand Down

0 comments on commit 0d31521

Please sign in to comment.