wiiuseJ 0.12 work in progress. Added method to force stack type and fixed IR.z value and nunchul thresholds.
git-svn-id: http://wiiusej.googlecode.com/svn/trunk@143 ae48ae66-6a45-0410-b38e-211266189506
This commit is contained in:
@@ -377,6 +377,24 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setNunchukAccelerationThreshold
|
||||
wiiuse_set_nunchuk_accel_threshold(wiiuse_get_by_id(wiimotes, nbMaxWiimotes, id), val);
|
||||
}
|
||||
|
||||
/**
|
||||
* Force the bluetooth stack type.(useful only for windows)
|
||||
*
|
||||
* @param bluetoothStackType
|
||||
* must be WiiUseApi.WIIUSE_STACK_UNKNOWN or WiiUseApi.WIIUSE_STACK_MS or
|
||||
* WiiUseApi.WIIUSE_STACK_BLUESOLEIL.
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_windowsSetBluetoothStack
|
||||
(JNIEnv *env, jobject obj, jint bluetoothStackType) {
|
||||
if (bluetoothStackType == 0){
|
||||
wiiuse_set_bluetooth_stack(wiimotes, nbMaxWiimotes, WIIUSE_STACK_UNKNOWN);
|
||||
}else if (bluetoothStackType == 1){
|
||||
wiiuse_set_bluetooth_stack(wiimotes, nbMaxWiimotes, WIIUSE_STACK_MS);
|
||||
}else if (bluetoothStackType == 2){
|
||||
wiiuse_set_bluetooth_stack(wiimotes, nbMaxWiimotes, WIIUSE_STACK_BLUESOLEIL);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get status and values from the wiimotes and send it through callbacks.
|
||||
* @param wim the wiimote object to fill with the datas.
|
||||
@@ -416,7 +434,7 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_specialPoll
|
||||
WIIUSE_GET_IR_SENSITIVITY_CORRECTED(wiimotes[i], &a);
|
||||
|
||||
mid = (*env)->GetMethodID(env, cls, "prepareIRevent",
|
||||
"(IIIIIIIIISSSF)V");
|
||||
"(IIFIIIIIISSSF)V");
|
||||
if (mid == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -30,4 +30,5 @@ Java_wiiusej_WiiUseApi_setTimeout
|
||||
Java_wiiusej_WiiUseApi_setIrSensitivity
|
||||
Java_wiiusej_WiiUseApi_setNunchukOrientationThreshold
|
||||
Java_wiiusej_WiiUseApi_setNunchukAccelerationThreshold
|
||||
Java_wiiusej_WiiUseApi_windowsSetBluetoothStack
|
||||
Java_wiiusej_WiiUseApi_specialPoll
|
||||
|
||||
@@ -255,6 +255,14 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setNunchukOrientationThreshold
|
||||
JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_setNunchukAccelerationThreshold
|
||||
(JNIEnv *, jobject, jint, jint);
|
||||
|
||||
/*
|
||||
* Class: wiiusej_WiiUseApi
|
||||
* Method: windowsSetBluetoothStack
|
||||
* Signature: (I)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_windowsSetBluetoothStack
|
||||
(JNIEnv *, jobject, jint);
|
||||
|
||||
/*
|
||||
* Class: wiiusej_WiiUseApi
|
||||
* Method: specialPoll
|
||||
|
||||
Reference in New Issue
Block a user