1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-10 06:01:52 +00:00

loader: add NpdmUtils function for invalidating the cache for a specific title

This commit is contained in:
misson20000 2018-10-10 20:46:43 -07:00 committed by SciresM
parent 376feb63bd
commit 18f51e9b2e
2 changed files with 10 additions and 2 deletions

View file

@ -500,4 +500,10 @@ u32 NpdmUtils::GetApplicationTypeRaw(u32 *caps, size_t num_caps) {
}
}
return application_type;
}
}
void NpdmUtils::InvalidateCache(u64 tid) {
if (g_npdm_cache.info.title_id == tid) {
g_npdm_cache.info = (const NpdmUtils::NpdmInfo){0};
}
}

View file

@ -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);
};
};