From de27f5f5f514abe366a32c5a74c0f6af97b424a8 Mon Sep 17 00:00:00 2001 From: mtheall Date: Tue, 25 Nov 2014 13:26:37 -0600 Subject: [PATCH] use aptMainLoop(). closes #9 --- source/main.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/source/main.c b/source/main.c index a20fdd7..ac3b7e4 100644 --- a/source/main.c +++ b/source/main.c @@ -15,21 +15,9 @@ static void loop(int (*callback)(void)) { #ifdef _3DS - int rc; - APP_STATUS status; - - /* check apt status */ - while((status = aptGetStatus()) != APP_EXITING) + while(aptMainLoop()) { - rc = 0; - if(status == APP_RUNNING) - rc = callback(); - else if(status == APP_SUSPENDING) - aptReturnToMenu(); - else if(status == APP_SLEEPMODE) - aptWaitStatusEvent(); - - if(rc == 0) + if(callback() == 0) console_render(); else return;