tastudio: loop guid dup check.

don't remove marker 0.
update when going to frame 0.
don't check hasDuplicate against current states if branch is not current (what was it for at all?). releases Used per branch removal.
This commit is contained in:
feos 2015-10-04 21:10:40 +03:00
parent 2a8578c74f
commit 89d919e6a9
4 changed files with 7 additions and 8 deletions
BizHawk.Client.Common/movie/tasproj
BizHawk.Client.EmuHawk/tools/TAStudio

View File

@ -27,11 +27,8 @@ namespace BizHawk.Client.Common
{
var currentHashes = this.Select(b => b.UniqueIdentifier.GetHashCode()).ToList();
// TODO: loop until this is unique
if (currentHashes.Contains(item.UniqueIdentifier.GetHashCode()))
{
item.UniqueIdentifier = Guid.NewGuid();
}
do item.UniqueIdentifier = Guid.NewGuid();
while (currentHashes.Contains(item.UniqueIdentifier.GetHashCode()));
base.Add(item);
}

View File

@ -218,6 +218,8 @@ namespace BizHawk.Client.Common
{
if (this[i].Frame >= startFrame)
{
if (i == 0)
continue;
_movie.ChangeLog.AddMarkerChange(null, this[i].Frame, this[i].Message);
RemoveAt(i);
deletedCount++;

View File

@ -698,8 +698,8 @@ namespace BizHawk.Client.Common
if (!BranchStates[frame].ContainsKey(branchHash))
return -2;
stateToMatch = BranchStates[frame][branchHash];
if (States.ContainsKey(frame) && States[frame] == stateToMatch)
return -1;
//if (States.ContainsKey(frame) && States[frame] == stateToMatch)
// return -1;
}
// there's no state for that frame at all

View File

@ -39,7 +39,7 @@ namespace BizHawk.Client.EmuHawk
MaybeFollowCursor();
return;
//return; seriously? well, maybe it's for some insane speedup, but it skipped updating when putting playback to frame zero.
}
else // Emulate to a future frame
{