From: yellows8 Date: Thu, 22 May 2014 18:21:39 +0000 (-0400) Subject: Adjusted sleep-mode code so that on leaving sleep-mode, GSPGPU_SetLcdForceBlack(... X-Git-Tag: v0.2.0~150^2 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=3e69e498bb0db4bc975201604bc0dc59da560a22;p=corbenik%2Fctrulib.git Adjusted sleep-mode code so that on leaving sleep-mode, GSPGPU_SetLcdForceBlack() is only used when the status was APP_RUNNING(also removed GSPGPU_SetLcdForceBlack call for prepare sleep-mode signal). --- diff --git a/libctru/source/APT.c b/libctru/source/APT.c index 4b28fcd..f58a8de 100644 --- a/libctru/source/APT.c +++ b/libctru/source/APT.c @@ -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;