]> Chaos Git - corbenik/ctrulib.git/commitdiff
Adjusted sleep-mode code so that on leaving sleep-mode, GSPGPU_SetLcdForceBlack(...
authoryellows8 <yellowstar6@gmail.com>
Thu, 22 May 2014 18:21:39 +0000 (14:21 -0400)
committeryellows8 <yellowstar6@gmail.com>
Thu, 22 May 2014 18:21:39 +0000 (14:21 -0400)
libctru/source/APT.c

index 4b28fcdab728ba4593046ab6e8aaabc0bcace7c1..f58a8deadd7649a8380948602ee8bbcd8c260d34 100644 (file)
@@ -214,7 +214,6 @@ void aptEventHandler(u32 arg)
 
                                                case 0x3: //preparing to enter sleep-mode
                                                        aptStatus_beforesleepmode = aptGetStatus();
-                                                       GSPGPU_SetLcdForceBlack(NULL, 1);
                                                        aptOpenSession();
                                                        APT_ReplySleepQuery(NULL, currentAppId, 0x1);
                                                        aptCloseSession();
@@ -234,7 +233,7 @@ void aptEventHandler(u32 arg)
                                                case 0x6: //leaving sleep-mode
                                                        if(aptGetStatus()==APP_SLEEPMODE)
                                                        {
-                                                               GSPGPU_SetLcdForceBlack(NULL, 0);
+                                                               if(aptStatus_beforesleepmode == APP_RUNNING)GSPGPU_SetLcdForceBlack(NULL, 0);
                                                                aptSetStatus(aptStatus_beforesleepmode);
                                                        }
                                                        break;