mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-23 02:42:09 +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
|
@ -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};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue