Skip to content

Commit 0d31521

Browse files
committed
Steam Deck: Attempt to guess an USB issue to fix #54
1 parent b57ba35 commit 0d31521

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scc/drivers/steamdeck.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,14 @@ def on_serial_got(self):
185185
self._id = f"deck{self._serial}"
186186
self.set_input_interrupt(ENDPOINT, 64, self._on_input)
187187

188-
def _on_input(self, endpoint, data):
188+
def _on_input(self, endpoint: int, data: bytearray) -> None:
189189
if not self._ready:
190190
self.daemon.add_controller(self)
191191
self.configure()
192192
self._ready = True
193193

194194
self._old_state, self._input = self._input, self._old_state
195-
ctypes.memmove(ctypes.addressof(self._input), data, len(data))
195+
ctypes.memmove(ctypes.addressof(self._input), bytes(data), len(data))
196196
if self._input.seq % UNLIZARD_INTERVAL == 0:
197197
# Keeps lizard mode from happening
198198
self.clear_mappings()

0 commit comments

Comments
 (0)