mirror of
https://github.com/wiiu-env/ftpiiu_plugin.git
synced 2024-11-04 20:15:09 +01:00
Only Home button can exit cia
This commit is contained in:
parent
e91a01ed44
commit
17f1036ca4
@ -35,6 +35,7 @@ loop(loop_status_t (*callback)(void))
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _3DS
|
||||||
/*! wait until the B button is pressed
|
/*! wait until the B button is pressed
|
||||||
*
|
*
|
||||||
* @returns loop status
|
* @returns loop status
|
||||||
@ -42,7 +43,6 @@ loop(loop_status_t (*callback)(void))
|
|||||||
static loop_status_t
|
static loop_status_t
|
||||||
wait_for_b(void)
|
wait_for_b(void)
|
||||||
{
|
{
|
||||||
#ifdef _3DS
|
|
||||||
/* update button state */
|
/* update button state */
|
||||||
hidScanInput();
|
hidScanInput();
|
||||||
|
|
||||||
@ -52,10 +52,8 @@ wait_for_b(void)
|
|||||||
|
|
||||||
/* B was not pressed */
|
/* B was not pressed */
|
||||||
return LOOP_CONTINUE;
|
return LOOP_CONTINUE;
|
||||||
#else
|
|
||||||
return LOOP_EXIT;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*! entry point
|
/*! entry point
|
||||||
*
|
*
|
||||||
@ -97,10 +95,22 @@ main(int argc,
|
|||||||
status = LOOP_EXIT;
|
status = LOOP_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
console_print("Press B to exit\n");
|
|
||||||
loop(wait_for_b);
|
|
||||||
|
|
||||||
#ifdef _3DS
|
#ifdef _3DS
|
||||||
|
u64 id;
|
||||||
|
APT_GetProgramID(&id);
|
||||||
|
|
||||||
|
if(id != 0x000400000BEEF500)
|
||||||
|
{
|
||||||
|
console_print("Press B to exit\n");
|
||||||
|
loop(wait_for_b);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
console_print("Press the Home Button to exit\n");
|
||||||
|
while(aptMainLoop())
|
||||||
|
console_render();
|
||||||
|
}
|
||||||
|
|
||||||
/* deinitialize 3DS services */
|
/* deinitialize 3DS services */
|
||||||
gfxExit();
|
gfxExit();
|
||||||
acExit();
|
acExit();
|
||||||
|
Loading…
Reference in New Issue
Block a user