summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <Sam@ACER-SUSE.SUSE>2008-03-05 22:10:06 +0900
committerSam Spilsbury <Sam@ACER-SUSE.SUSE>2008-03-05 22:10:06 +0900
commit0a44d5cdb5b1412345fe90782a67524c7b7d1abf (patch)
tree4c6c51380ae9868f1d723a492d127d177e7baefa
parent8091504a5bf2e1a30d0ad529a7f979b0b465df83 (diff)
downloadwiimote-0a44d5cdb5b1412345fe90782a67524c7b7d1abf.tar.gz
wiimote-0a44d5cdb5b1412345fe90782a67524c7b7d1abf.tar.bz2
* Nunchuck stick gesture support
-rw-r--r--compiz-wiimote.h12
-rw-r--r--wiimote.c4
-rw-r--r--wiimote.xml.in12
3 files changed, 24 insertions, 4 deletions
diff --git a/compiz-wiimote.h b/compiz-wiimote.h
index 38db2ce..aad3ff6 100644
--- a/compiz-wiimote.h
+++ b/compiz-wiimote.h
@@ -63,14 +63,18 @@ typedef enum _WiimoteGestureType{
WiimoteGestureTypeCButtonDepressed,
WiimoteGestureTypeZButtonPressed,
WiimoteGestureTypeZButtonDepressed,
- WiimoteGestureTypeNunchuckUp,
- WiimoteGestureTypeNunchuckDown,
- WiimoteGestureTypeNunchuckLeft,
- WiimoteGestureTypeNunchuckRight,
WiimoteGestureTypeUp,
WiimoteGestureTypeDown,
WiimoteGestureTypeLeft,
WiimoteGestureTypeRight,
+ WiimoteGestureTypeNunchuckUp,
+ WiimoteGestureTypeNunchuckDown,
+ WiimoteGestureTypeNunchuckLeft,
+ WiimoteGestureTypeNunchuckRight,
+ WiimoteGestureTypeNunchuckStickUp,
+ WiimoteGestureTypeNunchuckStickDown,
+ WiimoteGestureTypeNunchuckStickLeft,
+ WiimoteGestureTypeNunchuckStickRight,
WiimoteGestureTypeLength
} WiimoteGestureType;
diff --git a/wiimote.c b/wiimote.c
index a0780cb..29f6f8f 100644
--- a/wiimote.c
+++ b/wiimote.c
@@ -987,6 +987,10 @@ wiimoteCheckForGestures (void *vs)
ad->cWiimote[i].nunchuck.accY, 31, 32 );
wiimoteCheckGesture ( s, i, sens, &ad->cWiimote[i].nunchuck.oldAccX,
ad->cWiimote[i].nunchuck.accX, 33, 34 );
+ wiimoteCheckGesture ( s, i, sens, &ad->cWiimote[i].nunchuck.oldStickY,
+ ad->cWiimote[i].nunchuck.stickY, 35, 36 );
+ wiimoteCheckGesture ( s, i, sens, &ad->cWiimote[i].nunchuck.oldStickX,
+ ad->cWiimote[i].nunchuck.stickX, 37, 38 );
}
}
}
diff --git a/wiimote.xml.in b/wiimote.xml.in
index c1a921b..5fc61ce 100644
--- a/wiimote.xml.in
+++ b/wiimote.xml.in
@@ -198,6 +198,18 @@
<desc>
<value>34</value><name>Nunchuck Right</name>
</desc>
+ <desc>
+ <value>35</value><name>Nunchuck Stick Up</name>
+ </desc>
+ <desc>
+ <value>36</value><name>Nunchuck Stick Down</name>
+ </desc>
+ <desc>
+ <value>37</value><name>Nunchuck Stick Left</name>
+ </desc>
+ <desc>
+ <value>38</value><name>Nunchuck Stick Right</name>
+ </desc>
</option>
<option type="list" name="gesture_plugin_name">
<_short>Plugin Name</_short>