use aptMainLoop(). closes #9

This commit is contained in:
mtheall 2014-11-25 13:26:37 -06:00
parent 38a2b11e86
commit de27f5f5f5

View File

@ -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;