]> Chaos Git - corbenik/ctrulib.git/commitdiff
Enabled APT_AppletUtility code which was needed for aptReturnToMenu.
authoryellows8 <yellowstar6@gmail.com>
Thu, 22 May 2014 17:06:50 +0000 (13:06 -0400)
committeryellows8 <yellowstar6@gmail.com>
Thu, 22 May 2014 17:06:50 +0000 (13:06 -0400)
libctru/source/APT.c

index 7e54cea34055c7946d0c605e11ddec735d5b50a1..4ae8e1df0da3e870002217ad250338abcd286304 100644 (file)
@@ -122,9 +122,12 @@ void aptReturnToMenu()
        u32 ns_capinfo[0x20>>2];
        u32 tmp_params[0x20>>2];
 
-       /*aptOpenSession();
-       APT_AppletUtility(NULL, NULL, 0x6, 0x4, (u8*)&tmp0, 0x1, (u8*)&tmp1);
-       aptCloseSession();*/
+       if(aptGetStatusPower()==0)//This is only executed when ret-to-menu was triggered via the home-button, not the power-button.
+       {
+               aptOpenSession();
+               APT_AppletUtility(NULL, NULL, 0x6, 0x4, (u8*)&tmp0, 0x1, (u8*)&tmp1);
+               aptCloseSession();
+       }
 
        aptOpenSession();
        APT_PrepareToJumpToHomeMenu(NULL); //prepare for return to menu