Skip to content

Instantly share code, notes, and snippets.

@BFalkner
Created January 17, 2012 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BFalkner/1624569 to your computer and use it in GitHub Desktop.
Save BFalkner/1624569 to your computer and use it in GitHub Desktop.
An awful bug. Connect throws if no Wiimote is present.
class Baton : IBaton {
private static Wiimote wiimote;
public Baton() {
if (wiimote == null) {
wiimote = new Wiimote();
wiimote.Connect();
wiimote.SetReportType(InputReport.IRAccel, true);
wiimote.SetLEDs(false, false, false, false);
}
wiimote.WiimoteChanged += wiimote_WiimoteChanged;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment