Fix eviction logic for _gapFiller. (we were attempting to remove the wrong value from StateCache, and also weren't checking for reserved)
This commit is contained in:
parent
01bcf22802
commit
b5b1e17851
|
@ -389,7 +389,17 @@ namespace BizHawk.Client.Common
|
|||
AddStateCache(frame);
|
||||
source.SaveStateBinary(new BinaryWriter(s));
|
||||
},
|
||||
index => StateCache.Remove(index));
|
||||
index =>
|
||||
{
|
||||
var state = _gapFiller.GetState(index);
|
||||
StateCache.Remove(state.Frame);
|
||||
|
||||
if (_reserveCallback(state.Frame))
|
||||
{
|
||||
AddToReserved(state);
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
|
|
Loading…
Reference in New Issue