rdepena / node-dualshock-controller

Eventing API layer over HID for the Sony DualShock 3 and DualShock 4 controllers
208 stars 46 forks source link

Capture and emit errors from hid device. #60

Closed KyleLilly closed 7 years ago

KyleLilly commented 7 years ago

This PR just ties into the node-hid error event and bubbles it up. If a controller is disconnected after being connected and having listeners setup it will throw a native error which isn't super easy to recover from plus since it's uncaught it bubbles up to electron. By tying into this event disconnects can be handled a bit more gracefully.

Electron Error
rdepena commented 7 years ago

Awesome, I will push to NPM sometime this weekend.