diff --git a/dualshock.go b/dualshock.go index 413019d..54639dd 100644 --- a/dualshock.go +++ b/dualshock.go @@ -163,16 +163,14 @@ func (c *Controller) read() { // Listen for controller state changes func (c *Controller) Listen(handle func(State)) { - go func() { - for { - select { - case <-c.interrupt: - return - default: - handle(transform(<-c.queue)) - } + for { + select { + case <-c.interrupt: + return + default: + handle(transform(<-c.queue)) } - }() + } } // Errors returns a channel of reader errors