i am trying to code homebrew for wii using devkitpro but i cant find anything on using the nunchuk, does anyone know how i can check for nunchuk input?
yeah no i already checked in there a bunch but i cant find anything, well thanks for helping anywaysIs it not detailed in
https://github.com/devkitPro/libogc/blob/master/wiiuse/nunchuk.c
https://github.com/devkitPro/libogc/blob/master/wiiuse/nunchuk.h
Don't know what there is for examples these days offhand but there will usually be something to look at.
u32 exp_type;
WPAD_Probe(0, &exp_type);
if(exp_type == WPAD_EXP_NUNCHUK)
{
Your code here...
}
dude thank you so much!!!You first have to check if it's plugged by retrieving the expansion type :
Code:u32 exp_type; WPAD_Probe(0, &exp_type); if(exp_type == WPAD_EXP_NUNCHUK) { Your code here... }
Then use it like the wiimote input( with WPAD_ButtonsDown etc.). Buttons : WPAD_NUNCHUK_BUTTON_Z and WPAD_NUNCHUK_BUTTON_C.
You'll find all useful defines, functions and struct here : https://github.com/devkitPro/libogc/blob/master/gc/wiiuse/wpad.h
Here are some input examples :
https://wiibrew.org/wiki/User:Megazig
Genesis-Plus-GX input (great but maybe not that simple)
Tutorials:
https://www.codemii.com/2008/08/24/tutorial-3-controller-input/
http://sdz.tdct.org/sdz/rogrammez-sur-votre-wii.html#Lenunchuk (In french)


