evict savestates on branch update
This commit is contained in:
parent
f20d09c8c1
commit
bf1930c3ff
|
@ -53,5 +53,7 @@ namespace BizHawk.Client.Common
|
|||
void LoadBranch(TasBranch branch);
|
||||
|
||||
void CopyVerificationLog(IEnumerable<string> log);
|
||||
|
||||
bool IsReserved(int frame);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,6 +87,9 @@ namespace BizHawk.Client.Common
|
|||
newBranch.Uuid = old.Uuid;
|
||||
if (newBranch.UserText.Length is 0) newBranch.UserText = old.UserText;
|
||||
this[index] = newBranch;
|
||||
if (!_movie.IsReserved(old.Frame))
|
||||
_movie.TasStateManager.EvictReserved(old.Frame);
|
||||
|
||||
_movie.FlagChanges();
|
||||
}
|
||||
|
||||
|
@ -116,6 +119,9 @@ namespace BizHawk.Client.Common
|
|||
var result = base.Remove(item);
|
||||
if (result)
|
||||
{
|
||||
if (!_movie.IsReserved(item!.Frame))
|
||||
_movie.TasStateManager.EvictReserved(item.Frame);
|
||||
|
||||
_movie.FlagChanges();
|
||||
}
|
||||
|
||||
|
|
|
@ -340,7 +340,7 @@ namespace BizHawk.Client.Common
|
|||
public void ClearChanges() => Changes = false;
|
||||
public void FlagChanges() => Changes = true;
|
||||
|
||||
private bool IsReserved(int frame)
|
||||
public bool IsReserved(int frame)
|
||||
{
|
||||
// Why the frame before?
|
||||
// because we always navigate to the frame before and emulate 1 frame so that we ensure a proper frame buffer on the screen
|
||||
|
|
Loading…
Reference in New Issue