Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request - Use c button on nunchuck for coin/start #34

Open
mothra78 opened this issue Nov 19, 2023 · 1 comment
Open

Feature request - Use c button on nunchuck for coin/start #34

mothra78 opened this issue Nov 19, 2023 · 1 comment

Comments

@mothra78
Copy link

Thanks for this great project. I have compiled and installed on CYD and works great.
It seems I have an extra "c" button on the nintendo wii nunchuck which does not seem to be used.

I would love for it to allow to start the game and avoid using the boot button on the back of the board.

I will see if I can implement this feature...

@mothra78
Copy link
Author

Made a quick an dirty implementation by updating nunchuck.h with :

return ((joyX < 127 - NUNCHUCK_MOVE_THRESHOLD) ? BUTTON_LEFT : 0) | //Move Left
       ((joyX > 127 + NUNCHUCK_MOVE_THRESHOLD) ? BUTTON_RIGHT : 0) | //Move Right
       ((joyY > 127 + NUNCHUCK_MOVE_THRESHOLD) ? BUTTON_UP : 0) | //Move Up
       ((joyY < 127 - NUNCHUCK_MOVE_THRESHOLD) ? BUTTON_DOWN : 0) | //Move Down
       (nchuk.buttonZ() ? BUTTON_FIRE : 0) | // Fire
       (nchuk.buttonZ() ? BUTTON_START : 0) | // Start
       (nchuk.buttonC() ? BUTTON_COIN : 0); // Coin

and galagino.ino with buttons_get(void) {:

#ifdef NUNCHUCK_INPUT
return getNunchuckInput();
#else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant