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

This commit is contained in:
misson20000 authored and SciresM committed 2018-10-29 07:11:16 +09:00
1 parent 376feb63bd
commit 18f51e9b2e
2 files changed
+10 -2

No files matched your search

+7 -1
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};
}
}
+3 -1
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);
};
};