How to use wiimote's Power button?

Post Reply
User avatar
Pavel5750cz
Posts: 12
Joined: Tue Feb 14, 2023 9:34 pm

How to use wiimote's Power button?

Post by Pavel5750cz » Wed Dec 27, 2023 4:32 pm

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.
® Pavel5750cz

DacoTaco
Posts: 15
Joined: Tue Sep 22, 2009 5:37 pm

Re: How to use wiimote's Power button?

Post by DacoTaco » Wed Dec 27, 2023 9:11 pm

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

User avatar
Pavel5750cz
Posts: 12
Joined: Tue Feb 14, 2023 9:34 pm

Re: How to use wiimote's Power button?

Post by Pavel5750cz » Thu Dec 28, 2023 1:09 pm

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.
® Pavel5750cz

User avatar
Pavel5750cz
Posts: 12
Joined: Tue Feb 14, 2023 9:34 pm

Re: How to use wiimote's Power button?

Post by Pavel5750cz » Fri Dec 29, 2023 10:01 pm

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
® Pavel5750cz

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests