From: fincs Date: Wed, 13 May 2015 12:10:25 +0000 (+0200) Subject: Minor APT behaviour change X-Git-Tag: v0.6.0~61 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=e2b1da4d804f4d2e732ca9bf036d1cd740659be2;p=corbenik%2Fctrulib.git Minor APT behaviour change --- 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,14 +55,14 @@ __attribute__((weak)) void _aptDebug(int a, int b) static void aptAppStarted(void); -static bool aptIsCrippled(void) +static bool aptIsReinit(void) { - return (__system_runflags & RUNFLAG_APTWORKAROUND) != 0; + return (__system_runflags & RUNFLAG_APTREINIT) != 0; } -static bool aptIsReinit(void) +static bool aptIsCrippled(void) { - return (__system_runflags & RUNFLAG_APTREINIT) != 0; + return (__system_runflags & RUNFLAG_APTWORKAROUND) != 0 && !aptIsReinit(); } static Result __apt_initservicehandle() @@ -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);