From e2b1da4d804f4d2e732ca9bf036d1cd740659be2 Mon Sep 17 00:00:00 2001 From: fincs Date: Wed, 13 May 2015 14:10:25 +0200 Subject: [PATCH] Minor APT behaviour change --- libctru/source/services/apt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libctru/source/services/apt.c b/libctru/source/services/apt.c index c4de7d4..01754d5 100644 --- a/libctru/source/services/apt.c +++ b/libctru/source/services/apt.c @@ -55,16 +55,16 @@ __attribute__((weak)) void _aptDebug(int a, int b) static void aptAppStarted(void); -static bool aptIsCrippled(void) -{ - return (__system_runflags & RUNFLAG_APTWORKAROUND) != 0; -} - static bool aptIsReinit(void) { return (__system_runflags & RUNFLAG_APTREINIT) != 0; } +static bool aptIsCrippled(void) +{ + return (__system_runflags & RUNFLAG_APTWORKAROUND) != 0 && !aptIsReinit(); +} + static Result __apt_initservicehandle() { Result ret=0; @@ -510,7 +510,7 @@ void aptExit() if(!aptIsCrippled()) { bool isReinit = aptIsReinit(); - if (aptGetStatus() == APP_EXITING) + if (aptGetStatus() == APP_EXITING || !isReinit) { aptOpenSession(); APT_PrepareToCloseApplication(NULL, 0x1);