mirror of https://github.com/PCSX2/pcsx2.git
cdvdgigaherz: Add cache entry check function
Useful when you don't actually want the cached data.
This commit is contained in:
parent
23f48e07ed
commit
bb25ce1c6a
|
@ -77,6 +77,14 @@ void cdvdCacheUpdate(u32 lsn, s32 mode, u8 *data)
|
|||
Cache[entry].mode = mode;
|
||||
}
|
||||
|
||||
bool cdvdCacheCheck(u32 lsn, s32 mode)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_cache_lock);
|
||||
u32 entry = cdvdSectorHash(lsn, mode);
|
||||
|
||||
return Cache[entry].lsn == lsn && Cache[entry].mode == mode;
|
||||
}
|
||||
|
||||
bool cdvdCacheFetch(u32 lsn, s32 mode, u8 *data)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(s_cache_lock);
|
||||
|
|
Loading…
Reference in New Issue