Page 1 of 1

How to use wiimote's Power button?

Posted: Wed Dec 27, 2023 4:32 pm
by Pavel5750cz
Wiiuse does not seem to have enumerator on Power Button but i found some on lights. I would like to use Wii console's POWER,RESET and EJECT button events and chamge Wii and Wii remote light(lights up elsewhere), use wiimote memory and speaker. How to do it? I may try dig in libogc but I got to do other basics like gfx and sound and game so... but i would like to know to inplement those features coz i have a fun way to use them in mind.

Re: How to use wiimote's Power button?

Posted: Wed Dec 27, 2023 9:11 pm
by DacoTaco
Hi,

the wii's front buttons (power & reset) are controlled through callbacks. you can register your callback for the wii's front buttons using this code STM_RegisterEventHandler

an example can be found here : https://github.com/DacoTaco/priiloader/ ... t.cpp#L144
with the callback example from priiloader here : https://github.com/DacoTaco/priiloader/ ... #L105-L134

as for wiimote stuff, this is done through the wpad interface. see the header for the functions : https://github.com/devkitPro/libogc/blo ... use/wpad.h

Re: How to use wiimote's Power button?

Posted: Thu Dec 28, 2023 1:09 pm
by Pavel5750cz
Thank you i later found Developer tips on wiibrew and tried to get it working there. I have it with no errors but doesnt work. I understand them as functions onResume and onPause(and lot other) on android(I am crossplatform developer who has lot of android Java experience but loves C++ more). I will check lonks out. Thank you and happy day I wish to you.

Re: How to use wiimote's Power button?

Posted: Fri Dec 29, 2023 10:01 pm
by Pavel5750cz
I cannot use reset button according to Developer Tips because it is not void but something else and it gives error so i have it comented