From: fincs Date: Sun, 28 Jun 2015 09:30:57 +0000 (+0200) Subject: Do not signal APTHOOK_ONRESTORE when the app is being closed X-Git-Tag: v0.6.0~37 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=68fbd063751c0dd7b86effc97f9c06904a071219;p=corbenik%2Fctrulib.git Do not signal APTHOOK_ONRESTORE when the app is being closed --- diff --git a/libctru/source/services/apt.c b/libctru/source/services/apt.c index 1a40759..41a5228 100644 --- a/libctru/source/services/apt.c +++ b/libctru/source/services/apt.c @@ -574,7 +574,8 @@ bool aptMainLoop() case APP_SUSPENDING: aptCallHook(APTHOOK_ONSUSPEND); aptReturnToMenu(); - aptCallHook(APTHOOK_ONRESTORE); + if (aptGetStatus() == APP_RUNNING) + aptCallHook(APTHOOK_ONRESTORE); break; case APP_APPLETSTARTED: aptAppletStarted();