TasStateManager - Invalidate() - take savestate anchored movies into account
This commit is contained in:
parent
b301546237
commit
170bc4aab0
|
@ -168,8 +168,13 @@ namespace BizHawk.Client.Common
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Invalidate(int frame)
|
public void Invalidate(int frame)
|
||||||
{
|
{
|
||||||
if (States.Count > 0 && frame > 0) // Never invalidate frame 0, TODO: Only if movie is a power-on movie should we keep frame 0, check this
|
if (Any())
|
||||||
{
|
{
|
||||||
|
if (!_movie.StartsFromSavestate && frame == 0) // Never invalidate frame 0 on a non-savestate-anchored movie
|
||||||
|
{
|
||||||
|
frame = 1;
|
||||||
|
}
|
||||||
|
|
||||||
var statesToRemove = States
|
var statesToRemove = States
|
||||||
.Where(x => x.Key >= frame)
|
.Where(x => x.Key >= frame)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
Loading…
Reference in New Issue