MovieZone - remove usage of GlobalWin.Config

This commit is contained in:
adelikat 2020-11-29 10:57:50 -06:00
parent 8bbd6b2d8b
commit 488409a2ad
4 changed files with 5 additions and 5 deletions

View File

@ -210,7 +210,7 @@ namespace BizHawk.Client.EmuHawk
SelectedZone.Start = Emulator.Frame; SelectedZone.Start = Emulator.Frame;
} }
SelectedZone.PlaceZone(CurrentMovie); SelectedZone.PlaceZone(CurrentMovie, Config);
} }
private void SaveAsToolStripMenuItem_Click(object sender, EventArgs e) private void SaveAsToolStripMenuItem_Click(object sender, EventArgs e)

View File

@ -124,7 +124,7 @@ namespace BizHawk.Client.EmuHawk
_controller = newController; _controller = newController;
} }
public void PlaceZone(IMovie movie) public void PlaceZone(IMovie movie, Config config)
{ {
if (movie is ITasMovie tasMovie) if (movie is ITasMovie tasMovie)
{ {
@ -192,7 +192,7 @@ namespace BizHawk.Client.EmuHawk
if (movie.InputLogLength >= _emulator.Frame) if (movie.InputLogLength >= _emulator.Frame)
{ {
movie.SwitchToPlay(); movie.SwitchToPlay();
GlobalWin.Config.Movies.MovieEndAction = MovieEndAction.Record; config.Movies.MovieEndAction = MovieEndAction.Record; // TODO: this is a bad place to do this, and introduces a config dependency
} }
} }

View File

@ -254,7 +254,7 @@ namespace BizHawk.Client.EmuHawk
if (macro != null) if (macro != null)
{ {
macro.Start = TasView.FirstSelectedIndex ?? 0; macro.Start = TasView.FirstSelectedIndex ?? 0;
macro.PlaceZone(CurrentTasMovie); macro.PlaceZone(CurrentTasMovie, Config);
} }
} }

View File

@ -713,7 +713,7 @@ namespace BizHawk.Client.EmuHawk
{ {
Start = TasView.FirstSelectedIndex ?? 0 Start = TasView.FirstSelectedIndex ?? 0
}; };
loadZone.PlaceZone(CurrentTasMovie); loadZone.PlaceZone(CurrentTasMovie, Config);
} }
private void TastudioPlayMode() private void TastudioPlayMode()