]> Chaos Git - corbenik/ctrulib.git/commitdiff
Fix HOME button shiz.
authorStapleButter <thetotalworm@gmail.com>
Sat, 29 Nov 2014 20:04:03 +0000 (21:04 +0100)
committerStapleButter <thetotalworm@gmail.com>
Sat, 29 Nov 2014 20:04:03 +0000 (21:04 +0100)
(apparently APP_APPLETSTARTED happens when pressing the HOME button and causes aptWaitStatusEvent() to end prematurely)

libctru/source/services/apt.c

index e1f99acf415d0dca2417dcbc311bd3ca983e3d51..242abc1460942ac4212ef8cebb0f033d0a86ebb7 100644 (file)
@@ -352,9 +352,11 @@ static bool __handle_incoming_parameter() {
                return true;
 
        case 0x3: // "Launched library applet finished loading"
+               if (aptGetStatus() == APP_SUSPENDED) return true;
                aptSetStatus(APP_APPLETSTARTED);
                return true;
        case 0xA: // "Launched library applet closed"
+               if (aptGetStatus() == APP_SUSPENDED) return true;
                if(__apt_launchapplet_parambuf && __apt_launchapplet_parambufsize)memcpy(__apt_launchapplet_parambuf, aptParameters, __apt_launchapplet_parambufsize);
                aptSetStatus(APP_APPLETCLOSED);
                return true;