Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
rakyll committed Oct 8, 2021
1 parent 337b029 commit 2b9e0d0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions mk3/launchpad.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,12 @@ func discover() (input portmidi.DeviceID, output portmidi.DeviceID, err error) {
}
}
}

deviceIn := portmidi.DeviceID(in)
deviceOut := portmidi.DeviceID(out)
if in == -1 || out == -1 {
err = errors.New("launchpad: no launchpad is connected")
} else {
input = portmidi.DeviceID(in)
output = portmidi.DeviceID(out)
return deviceIn, deviceOut, errors.New("launchpad: no launchpad is connected")
}
return

return deviceIn, deviceOut, nil
}

0 comments on commit 2b9e0d0

Please sign in to comment.