disable multitrack recording for tasproj movies, the concept doesn't make sense, tastudio easily gives you multiplayer functionality by design. Delete some code that attempted to handle this scenario that likely didn't really work
This commit is contained in:
parent
3faff4811c
commit
a382af4e7f
|
@ -318,6 +318,10 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
Output("Multi-track can not be used in Full Movie Loadstates mode");
|
||||
}
|
||||
else if (Movie is ITasMovie)
|
||||
{
|
||||
Output("Multi-track can not be used with tasproj movies");
|
||||
}
|
||||
else
|
||||
{
|
||||
MultiTrack.IsActive ^= true;
|
||||
|
|
|
@ -182,93 +182,55 @@ namespace BizHawk.Client.Common
|
|||
|
||||
var newLog = new List<string>();
|
||||
int? timelineBranchFrame = null;
|
||||
|
||||
// We are in record mode so replace the movie log with the one from the savestate
|
||||
if (!Global.MovieSession.MultiTrack.IsActive)
|
||||
if (Global.Config.Movies.EnableBackupMovies && MakeBackup && Log.Count != 0)
|
||||
{
|
||||
if (Global.Config.Movies.EnableBackupMovies && MakeBackup && Log.Count != 0)
|
||||
{
|
||||
SaveBackup();
|
||||
MakeBackup = false;
|
||||
}
|
||||
|
||||
int counter = 0;
|
||||
while (true)
|
||||
{
|
||||
var line = reader.ReadLine();
|
||||
if (string.IsNullOrEmpty(line))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (line.Contains("Frame "))
|
||||
{
|
||||
var split = line.Split(' ');
|
||||
try
|
||||
{
|
||||
stateFrame = int.Parse(split[1]);
|
||||
}
|
||||
catch
|
||||
{
|
||||
errorMessage = "Savestate Frame number failed to parse";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (line.StartsWith("LogKey:"))
|
||||
{
|
||||
LogKey = line.Replace("LogKey:", "");
|
||||
}
|
||||
else if (line[0] == '|')
|
||||
{
|
||||
newLog.Add(line);
|
||||
if (!timelineBranchFrame.HasValue && counter < Log.Count && line != Log[counter])
|
||||
{
|
||||
timelineBranchFrame = counter;
|
||||
}
|
||||
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
||||
Log.Clear();
|
||||
Log.AddRange(newLog);
|
||||
SaveBackup();
|
||||
MakeBackup = false;
|
||||
}
|
||||
else // Multitrack mode
|
||||
|
||||
int counter = 0;
|
||||
while (true)
|
||||
{
|
||||
// TODO: consider TimelineBranchFrame here, my thinking is that there's never a scenario to invalidate state/lag data during multitrack
|
||||
var i = 0;
|
||||
while (true)
|
||||
var line = reader.ReadLine();
|
||||
if (string.IsNullOrEmpty(line))
|
||||
{
|
||||
var line = reader.ReadLine();
|
||||
if (line == null)
|
||||
break;
|
||||
}
|
||||
|
||||
if (line.Contains("Frame "))
|
||||
{
|
||||
var split = line.Split(' ');
|
||||
try
|
||||
{
|
||||
break;
|
||||
stateFrame = int.Parse(split[1]);
|
||||
}
|
||||
catch
|
||||
{
|
||||
errorMessage = "Savestate Frame number failed to parse";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (line.StartsWith("LogKey:"))
|
||||
{
|
||||
LogKey = line.Replace("LogKey:", "");
|
||||
}
|
||||
else if (line[0] == '|')
|
||||
{
|
||||
newLog.Add(line);
|
||||
if (!timelineBranchFrame.HasValue && counter < Log.Count && line != Log[counter])
|
||||
{
|
||||
timelineBranchFrame = counter;
|
||||
}
|
||||
|
||||
if (line.Contains("Frame "))
|
||||
{
|
||||
var strs = line.Split(' ');
|
||||
try
|
||||
{
|
||||
stateFrame = int.Parse(strs[1]);
|
||||
}
|
||||
catch
|
||||
{
|
||||
errorMessage = "Savestate Frame number failed to parse";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (line.StartsWith("LogKey:"))
|
||||
{
|
||||
LogKey = line.Replace("LogKey:", "");
|
||||
}
|
||||
else if (line.StartsWith("|"))
|
||||
{
|
||||
SetFrame(i, line);
|
||||
i++;
|
||||
}
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
||||
Log.Clear();
|
||||
Log.AddRange(newLog);
|
||||
|
||||
if (!stateFrame.HasValue)
|
||||
{
|
||||
errorMessage = "Savestate Frame number failed to parse";
|
||||
|
|
Loading…
Reference in New Issue