From 3c289d33c65c86046f90d8fbbf646178c1c1431c Mon Sep 17 00:00:00 2001 From: "guilhem.duche" Date: Thu, 8 May 2008 00:10:34 +0000 Subject: [PATCH] 0.12 work in progress git-svn-id: http://wiiusej.googlecode.com/svn/trunk@139 ae48ae66-6a45-0410-b38e-211266189506 --- WiiUseJC/wiiusej_WiiUseApi.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/WiiUseJC/wiiusej_WiiUseApi.c b/WiiUseJC/wiiusej_WiiUseApi.c index 4a02e69..905b1c4 100644 --- a/WiiUseJC/wiiusej_WiiUseApi.c +++ b/WiiUseJC/wiiusej_WiiUseApi.c @@ -489,6 +489,24 @@ JNIEXPORT void JNICALL Java_wiiusej_WiiUseApi_specialPoll (*env)->CallVoidMethod(env, gath, mid, wiimotes[i]->unid); break; + case WIIUSE_NUNCHUK_INSERTED: + /* the wiimote disconnected */ + mid = (*env)->GetMethodID(env, cls, "addNunchukInsertedEvent", "(I)V"); + if (mid == 0) { + return; + } + (*env)->CallVoidMethod(env, gath, mid, wiimotes[i]->unid); + break; + + case WIIUSE_NUNCHUK_REMOVED: + /* the wiimote disconnected */ + mid = (*env)->GetMethodID(env, cls, "addNunchukRemovedEvent", "(I)V"); + if (mid == 0) { + return; + } + (*env)->CallVoidMethod(env, gath, mid, wiimotes[i]->unid); + break; + default: break; }