Switch-Case inputs December 12, 2008 01:27PM | Registered: 16 years ago Posts: 37 |
u16 buttonsHeld = WPAD_ButtonsHeld(0);
if (buttonsHeld & WPAD_BUTTON_A ) { printf("Button A is being held down.\n"); } else { if (buttonsHeld & WPAD_BUTTON_1){ printf("Button 1 is being held down.\n"); } }
Re: Switch-Case inputs December 12, 2008 01:35PM | Registered: 16 years ago Posts: 443 |
switch( buttonsHeld ) { case WPAD_BUTTON_1: break; case WPAD_BUTTON_2: break; }
case WPAD_BUTTON_1 | WPAD_BUTTON_2: break;
Re: Switch-Case inputs December 12, 2008 03:22PM | Registered: 16 years ago Posts: 1,012 |
Re: Switch-Case inputs December 12, 2008 04:00PM | Registered: 16 years ago Posts: 37 |
Re: Switch-Case inputs December 14, 2008 09:27PM | Registered: 16 years ago Posts: 37 |
Re: Switch-Case inputs December 14, 2008 10:13PM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Switch-Case inputs December 14, 2008 10:18PM | Registered: 16 years ago Posts: 441 |
Re: Switch-Case inputs December 14, 2008 10:21PM | Registered: 16 years ago Posts: 265 |
Re: Switch-Case inputs December 15, 2008 12:10AM | Registered: 16 years ago Posts: 37 |
Re: Switch-Case inputs December 15, 2008 12:20AM | Registered: 16 years ago Posts: 77 |
Re: Switch-Case inputs December 15, 2008 12:30AM | Registered: 16 years ago Posts: 37 |
Re: Switch-Case inputs December 15, 2008 12:55AM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Switch-Case inputs December 15, 2008 03:55AM | Registered: 16 years ago Posts: 441 |
Quote
ArikadoWPAD_Init(); for(int pause = 0; pause < 150; pause++){ } //Check for button press
Try this, it'll slow everything down for a tiny bit. Modify 150 if necessary.
Re: Switch-Case inputs December 15, 2008 07:30AM | Registered: 16 years ago Posts: 265 |
Re: Switch-Case inputs December 15, 2008 08:02AM | Registered: 16 years ago Posts: 37 |
Re: Switch-Case inputs December 15, 2008 02:28PM | Registered: 16 years ago Posts: 1,012 |
Re: Switch-Case inputs December 15, 2008 05:32PM | Admin Registered: 16 years ago Posts: 5,132 |
Funny, I've gotten it work in some of my past games. Usually 150 ends up being some insane number though, but it definitely works.Quote
Tantric
That won't work at all. If you want to "slow down" you can try sleep() or usleep(). But this still wouldn't help you with what you're trying to do.
while(wiimotes are not initialized){ }Not sure what wiimotes not initialized would be I don't have libogc in front of me at the moment. There is something for it though.
Re: Switch-Case inputs December 15, 2008 06:01PM | Registered: 16 years ago Posts: 1,012 |
Quote
ArikadoFunny, I've gotten it work in some of my past games. Usually 150 ends up being some insane number though, but it definitely works.Quote
Tantric
That won't work at all. If you want to "slow down" you can try sleep() or usleep(). But this still wouldn't help you with what you're trying to do.
Re: Switch-Case inputs December 15, 2008 08:27PM | Registered: 16 years ago Posts: 276 |
Re: Switch-Case inputs December 16, 2008 07:12AM | Registered: 16 years ago Posts: 37 |