diff --git a/stratosphere/loader/source/ldr_npdm.cpp b/stratosphere/loader/source/ldr_npdm.cpp index e7a110ced..ad688f85e 100644 --- a/stratosphere/loader/source/ldr_npdm.cpp +++ b/stratosphere/loader/source/ldr_npdm.cpp @@ -500,4 +500,10 @@ u32 NpdmUtils::GetApplicationTypeRaw(u32 *caps, size_t num_caps) { } } return application_type; -} \ No newline at end of file +} + +void NpdmUtils::InvalidateCache(u64 tid) { + if (g_npdm_cache.info.title_id == tid) { + g_npdm_cache.info = (const NpdmUtils::NpdmInfo){0}; + } +} diff --git a/stratosphere/loader/source/ldr_npdm.hpp b/stratosphere/loader/source/ldr_npdm.hpp index b04606046..8b9c2dd1e 100644 --- a/stratosphere/loader/source/ldr_npdm.hpp +++ b/stratosphere/loader/source/ldr_npdm.hpp @@ -108,6 +108,8 @@ class NpdmUtils { static FILE *OpenNpdm(u64 tid); static Result LoadNpdm(u64 tid, NpdmInfo *out); static Result LoadNpdmFromCache(u64 tid, NpdmInfo *out); + + static void InvalidateCache(u64 tid); private: static Result LoadNpdmInternal(FILE *f_npdm, NpdmCache *cache); -}; \ No newline at end of file +};