Crash on u32 binary comparison
Posted: Tue Nov 11, 2008 6:31 pm
I've got an SDL-based game (WiiDoom), and in the startup routines, I'm watching for button presses. The following code works:
No problems whatsoever. If I add a check for most other buttons (I haven't tried them all), the game crashes. For instance:
will crash the game. Every time. I can try other buttons, or move the statement to different parts of the routine, and still crashes. If I take it back out, it works.
Ideas???
Code: Select all
while(true)
{
WPAD_ScanPads();
u32 wpaddown = WPAD_ButtonsDown(0);
if (wpaddown & WPAD_BUTTON_B) exit(0);
if (wpaddown & WPAD_BUTTON_1) done = true;
}
Code: Select all
if (wpaddown & WPAD_BUTTON_LEFT) x = 1;
Ideas???