Only Home button can exit cia

This commit is contained in:
Michael Theall 2016-08-10 23:08:08 -05:00
parent e91a01ed44
commit 17f1036ca4

View File

@ -35,6 +35,7 @@ loop(loop_status_t (*callback)(void))
#endif
}
#ifdef _3DS
/*! wait until the B button is pressed
*
* @returns loop status
@ -42,7 +43,6 @@ loop(loop_status_t (*callback)(void))
static loop_status_t
wait_for_b(void)
{
#ifdef _3DS
/* update button state */
hidScanInput();
@ -52,10 +52,8 @@ wait_for_b(void)
/* B was not pressed */
return LOOP_CONTINUE;
#else
return LOOP_EXIT;
#endif
}
#endif
/*! entry point
*
@ -97,10 +95,22 @@ main(int argc,
status = LOOP_EXIT;
}
console_print("Press B to exit\n");
loop(wait_for_b);
#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 */
gfxExit();
acExit();