Fixed getButtonPress

This commit is contained in:
Kristian Lauszus 2012-10-04 01:46:38 +02:00
parent ae082b1860
commit 452ab7491f

View file

@ -772,11 +772,7 @@ void WII::checkMotionPresent() {
/************************************************************/
bool WII::getButtonPress(Button b) { // Return true when a button is pressed
bool press = (ButtonState & (uint32_t)b);
if(b == Z || b == C)
return !press; // The nunchuck buttons are cleared when pressed
else
return press;
return (ButtonState & (uint32_t)b);
}
bool WII::getButtonClick(Button b) { // Only return true when a button is clicked
bool click = (ButtonClickState & (uint32_t)b);