From 2fc1fe672a612ee0449c86068672cc74217fdd77 Mon Sep 17 00:00:00 2001 From: "guilhem.duche" Date: Tue, 16 Sep 2008 22:05:05 +0000 Subject: [PATCH] fix for disconnection of several wiimotes git-svn-id: http://wiiusej.googlecode.com/svn/trunk@191 ae48ae66-6a45-0410-b38e-211266189506 --- WiiUseJ/WiiUseJ.dll | Bin 30985 -> 30985 bytes WiiUseJ/src/wiiusej/WiiUseApiManager.java | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WiiUseJ/WiiUseJ.dll b/WiiUseJ/WiiUseJ.dll index 384c8290680077de91f24e16656cb60cbddeb842..823a419541ffdb58dedd5aef63e72400632e00d9 100644 GIT binary patch delta 32 lcmeDD#Mt?XaY6^PN@xGXZeQkoYK$9iYbt}do7q*ELIK<{3+(^^ delta 32 mcmeDD#Mt?XaY6_4ar5el-M-9sni)3U)>H;@H?ylSg#rNU%?#lH diff --git a/WiiUseJ/src/wiiusej/WiiUseApiManager.java b/WiiUseJ/src/wiiusej/WiiUseApiManager.java index 6f938b7..bea28df 100644 --- a/WiiUseJ/src/wiiusej/WiiUseApiManager.java +++ b/WiiUseJ/src/wiiusej/WiiUseApiManager.java @@ -52,7 +52,7 @@ public class WiiUseApiManager extends Thread { public static int WIIUSE_STACK_MS = 1; public static int WIIUSE_STACK_BLUESOLEIL = 2; - private static WiiUseApiManager getInstance() { + public static WiiUseApiManager getInstance() { return instance; } @@ -211,7 +211,7 @@ public class WiiUseApiManager extends Thread { int index = 0; boolean found = false; while (index < wiimotes.length && !found) { - if (wiimotes[index].getId() == id) {// we have a wiimote with this + if (wiimotes[index]!=null && wiimotes[index].getId() == id) {// we have a wiimote with this // id // remove the wiimote removeWiiUseApiListener(wiimotes[index]);