From 03aeab5a1fdba87ae516e7c9fb9b6ea523976ae1 Mon Sep 17 00:00:00 2001 From: xor Date: Sun, 27 Mar 2022 04:03:36 +0200 Subject: [PATCH] Be able to inject more than once ;) --- vax/source/main.cpp | 4 ++-- vax/source/vax/sf/sf_LoaderService.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/vax/source/main.cpp b/vax/source/main.cpp index 72cf4af..b83dd9a 100644 --- a/vax/source/main.cpp +++ b/vax/source/main.cpp @@ -82,9 +82,9 @@ namespace vax { } -namespace { +bool g_InBootProcess = false; - bool g_InBootProcess = false; +namespace { void InjectProcess(const svc::Handle debug_h, const u64 program_id, const u64 thread_id) { AMS_UNUSED(program_id); diff --git a/vax/source/vax/sf/sf_LoaderService.cpp b/vax/source/vax/sf/sf_LoaderService.cpp index 7c8e772..aae2b2e 100644 --- a/vax/source/vax/sf/sf_LoaderService.cpp +++ b/vax/source/vax/sf/sf_LoaderService.cpp @@ -4,6 +4,8 @@ using namespace ams; +extern bool g_InBootProcess; + namespace vax::sf { ams::Result LoaderService::NotifyBootFinished(const ams::sf::ClientProcessId &client_pid) { @@ -11,6 +13,7 @@ namespace vax::sf { R_TRY(mod::RestoreBootRegionBackup(static_cast(client_pid.GetValue()))); + g_InBootProcess = false; return ResultSuccess(); }