mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Fixed getButtonPress
This commit is contained in:
parent
ae082b1860
commit
452ab7491f
1 changed files with 1 additions and 5 deletions
6
Wii.cpp
6
Wii.cpp
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue