This commit is contained in:
d0k3 2019-10-18 18:58:05 +02:00 committed by Wolfvak
parent cf7fa9e401
commit cfe535f20b

View File

@ -147,7 +147,14 @@ u32 InputWait(u32 timeout_sec) {
do {
u32 newpad = HID_ReadState();
if (!(newpad & ~(SHELL_OPEN|SHELL_CLOSED))) { // no buttons pressed, check for I/O changes instead
// handle closed shell (wait for open)
if (newpad & SHELL_CLOSED) {
while (HID_ReadState() & SHELL_CLOSED);
continue;
}
// no buttons pressed, check for I/O changes instead
if (!(newpad & ~(SHELL_OPEN|SHELL_CLOSED))) {
u32 state = CART_STATE;
if (state != oldcart)
return state ? CART_INSERT : CART_EJECT;
@ -170,12 +177,6 @@ u32 InputWait(u32 timeout_sec) {
(delay && (timer_msec(timer) < delay))))
continue;
// handle closed shell (wait for open)
if (newpad & SHELL_CLOSED) {
while (HID_ReadState() & SHELL_CLOSED);
continue;
}
// screenshot handling
if ((newpad & BUTTON_ANY) == (BUTTON_R1 | BUTTON_L1))
CreateScreenshot();