Macro tool - fix NRE on File -> Load Macro, fxies #2375
This commit is contained in:
parent
32a20dcb3d
commit
32b7358f07
|
@ -250,7 +250,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void DummyLoadMacro(string path)
|
||||
{
|
||||
MovieZone loadZone = new MovieZone(path, Emulator, Tools);
|
||||
MovieZone loadZone = new MovieZone(path, Emulator, MovieSession, Tools);
|
||||
_zones.Add(loadZone);
|
||||
ZonesList.Items.Add($"{loadZone.Name} - length: {loadZone.Length}");
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
Config.RecentMacros.Add(dialog.FileName);
|
||||
return new MovieZone(dialog.FileName, emulator ?? Emulator, tools ?? Tools);
|
||||
return new MovieZone(dialog.FileName, emulator ?? Emulator, MovieSession, tools ?? Tools);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -211,7 +211,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
File.AppendAllLines(fileName, _log);
|
||||
}
|
||||
|
||||
public MovieZone(string fileName, IEmulator emulator, ToolManager tools)
|
||||
public MovieZone(string fileName, IEmulator emulator, IMovieSession movieSession, ToolManager tools)
|
||||
{
|
||||
if (!File.Exists(fileName))
|
||||
{
|
||||
|
@ -220,6 +220,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
_emulator = emulator;
|
||||
_tools = tools;
|
||||
_movieSession = movieSession;
|
||||
|
||||
string[] readText = File.ReadAllLines(fileName);
|
||||
|
||||
|
|
|
@ -707,7 +707,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
return;
|
||||
}
|
||||
|
||||
var loadZone = new MovieZone(path, Emulator, Tools)
|
||||
var loadZone = new MovieZone(path, Emulator, MovieSession, Tools)
|
||||
{
|
||||
Start = TasView.FirstSelectedIndex ?? 0
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue