return res;
}
+static void aptClearParamQueue(void)
+{
+ // Check for parameters?
+ for (;;)
+ {
+ APT_Command cmd;
+ Result res = APT_GlanceParameter(envGetAptAppId(), aptParameters, sizeof(aptParameters), NULL, &cmd, NULL, NULL);
+ if (R_FAILED(res) || cmd==APTCMD_NONE) break;
+ _aptDebug(2, cmd);
+ svcClearEvent(aptEvents[2]);
+ APT_CancelParameter(APPID_NONE, envGetAptAppId(), NULL);
+ }
+}
+
static void aptInitCaptureInfo(aptCaptureBufInfo* capinfo)
{
GSPGPU_CaptureInfo gspcapinfo;
closeAptLock = false;
srvInit(); // Keep srv initialized
} else
+ {
APT_Finalize(envGetAptAppId());
+ aptClearParamQueue();
+ }
svcSignalEvent(aptEvents[0]);
threadJoin(aptEventHandlerThread, U64_MAX);
return cmd;
}
-static void aptClearParamQueue(void)
-{
- // Check for parameters?
- for (;;)
- {
- APT_Command cmd;
- Result res = APT_GlanceParameter(envGetAptAppId(), aptParameters, sizeof(aptParameters), NULL, &cmd, NULL, NULL);
- if (R_FAILED(res) || cmd==APTCMD_NONE) break;
- _aptDebug(2, cmd);
- svcClearEvent(aptEvents[2]);
- APT_CancelParameter(APPID_NONE, envGetAptAppId(), NULL);
- }
-}
-
static void aptScreenTransfer(NS_APPID appId, bool sysApplet)
{
aptCallHook(APTHOOK_ONSUSPEND);