diff --git a/source/main.c b/source/main.c index 46c76ea..2b5e7ce 100644 --- a/source/main.c +++ b/source/main.c @@ -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();