Ejemplo n.º 1
0
/**
 * 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);
	}
}
void CryVR_WiimoteManagerPlugin::SetBluetooth( int value )
{
    switch ( value )
    {
        case 1 :
            {
                wiiuse_set_bluetooth_stack( wiimotes, found, WIIUSE_STACK_MS );
                break;
            }

        case 2 :
            {
                wiiuse_set_bluetooth_stack( wiimotes, found, WIIUSE_STACK_BLUESOLEIL );
                break;
            }

        default:
            wiiuse_set_bluetooth_stack( wiimotes, found, WIIUSE_STACK_UNKNOWN );
    }
}