fixed the bug for java 1.5

git-svn-id: http://wiiusej.googlecode.com/svn/trunk@192 ae48ae66-6a45-0410-b38e-211266189506
This commit is contained in:
guilhem.duche
2008-09-28 19:29:13 +00:00
parent 2fc1fe672a
commit f9e8d5d1fb
4 changed files with 12 additions and 5 deletions

View File

@@ -38,9 +38,13 @@ Go to : http://wiiusej.googlecode.com/ for further documentations.
CHANGELOG :
wiiusej 0.12b :
- make wiiusej compatible with java 1.5.
- fixed a bug that made Null pointer exception happen when disconnecting several wiimotes.
wiiusej 0.12a :
- added guitar hero controller support
- added classic controller support
- added guitar hero controller support.
- added classic controller support.
wiiusej 0.12 :
- added nunchuk support.

View File

@@ -227,7 +227,6 @@ public class WiiUseApiManager extends Thread {
}
index++;
}
}
/**

View File

@@ -108,7 +108,9 @@ public class IREvent extends GenericEvent {
* @return the list of 2D points
*/
public IRSource[] getIRPoints() {
return java.util.Arrays.copyOfRange(IRPoints, 0, indexPoints);
IRSource[] ir = new IRSource[indexPoints];
System.arraycopy(IRPoints, 0, ir, 0, indexPoints);
return ir;
}
/**

View File

@@ -490,7 +490,9 @@ public class EventsGatherer {
* @return events received.
*/
public WiiUseApiEvent[] getEvents() {
return java.util.Arrays.copyOfRange(events, 0, index);
WiiUseApiEvent[] ev = new WiiUseApiEvent[index];
System.arraycopy(events, 0, ev, 0, index);
return ev;
}
/**