Make WaitInput wait for a press, not a release.
This commit is contained in:
parent
d3768d4fe8
commit
ce0eec34e7
@ -1,11 +1,11 @@
|
|||||||
#include "hid.h"
|
#include "hid.h"
|
||||||
|
|
||||||
u32 InputWait(void) {
|
u32 InputWait(void) {
|
||||||
u32 pad_state_old = HID_STATE;
|
u32 pad_state_old = ~HID_STATE;
|
||||||
while (true) {
|
while (true) {
|
||||||
u32 pad_state = HID_STATE;
|
u32 pad_state = ~HID_STATE;
|
||||||
if ((pad_state ^ pad_state_old) & pad_state)
|
if ((pad_state ^ pad_state_old) & pad_state)
|
||||||
return ~pad_state;
|
return pad_state;
|
||||||
pad_state_old = pad_state;
|
pad_state_old = pad_state;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user