Tweak button delay in hid.c

This commit is contained in:
d0k3 2019-05-01 03:22:37 +02:00
parent 7d3a5270f1
commit f4fc17f145

View File

@ -138,7 +138,7 @@ u32 InputWait(u32 timeout_sec) {
while (HID_ReadState() & SHELL_CLOSED); while (HID_ReadState() & SHELL_CLOSED);
} }
delay = delay ? 72 : 128; delay = delay ? 144 : 256;
do { do {
u32 newpad = HID_ReadState(); u32 newpad = HID_ReadState();
@ -172,13 +172,11 @@ u32 InputWait(u32 timeout_sec) {
continue; continue;
} }
u32 t_pressed = 0; // screenshot handling
while((t_pressed++ < 0x13000) && (newpad == HID_ReadState()));
if (t_pressed >= 0x13000) {
if ((newpad & BUTTON_ANY) == (BUTTON_R1 | BUTTON_L1)) if ((newpad & BUTTON_ANY) == (BUTTON_R1 | BUTTON_L1))
CreateScreenshot(); // screenshot handling CreateScreenshot();
return newpad; return newpad;
}
} while (!timeout_sec || (timeout_sec && (timer_sec(timer) < timeout_sec))); } while (!timeout_sec || (timeout_sec && (timer_sec(timer) < timeout_sec)));
return TIMEOUT_HID; return TIMEOUT_HID;