mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Fix #551
This commit is contained in:
parent
cf7fa9e401
commit
cfe535f20b
@ -147,7 +147,14 @@ u32 InputWait(u32 timeout_sec) {
|
|||||||
do {
|
do {
|
||||||
u32 newpad = HID_ReadState();
|
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;
|
u32 state = CART_STATE;
|
||||||
if (state != oldcart)
|
if (state != oldcart)
|
||||||
return state ? CART_INSERT : CART_EJECT;
|
return state ? CART_INSERT : CART_EJECT;
|
||||||
@ -170,12 +177,6 @@ u32 InputWait(u32 timeout_sec) {
|
|||||||
(delay && (timer_msec(timer) < delay))))
|
(delay && (timer_msec(timer) < delay))))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// handle closed shell (wait for open)
|
|
||||||
if (newpad & SHELL_CLOSED) {
|
|
||||||
while (HID_ReadState() & SHELL_CLOSED);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// screenshot handling
|
// screenshot handling
|
||||||
if ((newpad & BUTTON_ANY) == (BUTTON_R1 | BUTTON_L1))
|
if ((newpad & BUTTON_ANY) == (BUTTON_R1 | BUTTON_L1))
|
||||||
CreateScreenshot();
|
CreateScreenshot();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user