mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-01-10 19:36:19 +00:00
loader: add NpdmUtils function for invalidating the cache for a specific title
This commit is contained in:
parent
376feb63bd
commit
18f51e9b2e
2 changed files with 10 additions and 2 deletions
|
@ -501,3 +501,9 @@ u32 NpdmUtils::GetApplicationTypeRaw(u32 *caps, size_t num_caps) {
|
||||||
}
|
}
|
||||||
return application_type;
|
return application_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NpdmUtils::InvalidateCache(u64 tid) {
|
||||||
|
if (g_npdm_cache.info.title_id == tid) {
|
||||||
|
g_npdm_cache.info = (const NpdmUtils::NpdmInfo){0};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -108,6 +108,8 @@ class NpdmUtils {
|
||||||
static FILE *OpenNpdm(u64 tid);
|
static FILE *OpenNpdm(u64 tid);
|
||||||
static Result LoadNpdm(u64 tid, NpdmInfo *out);
|
static Result LoadNpdm(u64 tid, NpdmInfo *out);
|
||||||
static Result LoadNpdmFromCache(u64 tid, NpdmInfo *out);
|
static Result LoadNpdmFromCache(u64 tid, NpdmInfo *out);
|
||||||
|
|
||||||
|
static void InvalidateCache(u64 tid);
|
||||||
private:
|
private:
|
||||||
static Result LoadNpdmInternal(FILE *f_npdm, NpdmCache *cache);
|
static Result LoadNpdmInternal(FILE *f_npdm, NpdmCache *cache);
|
||||||
};
|
};
|
Loading…
Reference in a new issue