From c75ed65d8b8bd047bec54fefa92feb8b68afaa96 Mon Sep 17 00:00:00 2001 From: StapleButter Date: Sat, 29 Nov 2014 21:04:03 +0100 Subject: [PATCH] Fix HOME button shiz. (apparently APP_APPLETSTARTED happens when pressing the HOME button and causes aptWaitStatusEvent() to end prematurely) --- libctru/source/services/apt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libctru/source/services/apt.c b/libctru/source/services/apt.c index e1f99ac..242abc1 100644 --- a/libctru/source/services/apt.c +++ b/libctru/source/services/apt.c @@ -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;