Skip to content

Commit

Permalink
Fix: wired controller interpreting PING packets as input. Ref #215
Browse files Browse the repository at this point in the history
  • Loading branch information
kozec committed Dec 29, 2018
1 parent 521f9e9 commit ad641f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/daemon/drivers/sc/by_cable.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ void input_interrupt_cb(Daemon* d, USBDevHandle hndl, uint8_t endpoint, const ui
// TODO: Deallocate sc
return;
}
handle_input(sc, (SCInput*)data);
SCInput* i = (SCInput*)data;
if (i->ptype == PT_INPUT)
handle_input(sc, i);
}


Expand Down
2 changes: 1 addition & 1 deletion src/daemon/drivers/sc/sc.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ struct SCController {
};

typedef enum {
PT_IDLE = 0x04,
PT_INPUT = 0x01,
PT_HOTPLUG = 0x03,
PT_IDLE = 0x04,
PT_OFF = 0x9f,
PT_AUDIO = 0xb6,
PT_CLEAR_MAPPINGS = 0x81,
Expand Down

0 comments on commit ad641f6

Please sign in to comment.