MovieSession.QueueNewMovie - reduce dependencies

This commit is contained in:
adelikat 2020-04-19 14:18:09 -05:00
parent 5e7d666548
commit 91dd8c938e
3 changed files with 6 additions and 6 deletions

View File

@ -228,7 +228,7 @@ namespace BizHawk.Client.Common
} }
/// <exception cref="MoviePlatformMismatchException"><paramref name="record"/> is <see langword="false"/> and <paramref name="movie"/>.<see cref="IMovie.SystemID"/> does not match <paramref name="emulator"/>.<see cref="IEmulator.SystemId"/></exception> /// <exception cref="MoviePlatformMismatchException"><paramref name="record"/> is <see langword="false"/> and <paramref name="movie"/>.<see cref="IMovie.SystemID"/> does not match <paramref name="emulator"/>.<see cref="IEmulator.SystemId"/></exception>
public void QueueNewMovie(IMovie movie, bool record, IEmulator emulator) public void QueueNewMovie(IMovie movie, bool record, string systemId)
{ {
if (movie.IsActive() && movie.Changes) if (movie.IsActive() && movie.Changes)
{ {
@ -239,10 +239,10 @@ namespace BizHawk.Client.Common
{ {
movie.Load(false); movie.Load(false);
if (movie.SystemID != emulator.SystemId) if (movie.SystemID != systemId)
{ {
throw new MoviePlatformMismatchException( throw new MoviePlatformMismatchException(
$"Movie system Id ({movie.SystemID}) does not match the currently loaded platform ({emulator.SystemId}), unable to load"); $"Movie system Id ({movie.SystemID}) does not match the currently loaded platform ({systemId}), unable to load");
} }
} }
@ -252,7 +252,7 @@ namespace BizHawk.Client.Common
if (!record) if (!record)
{ {
var preference = emulator.SystemId; var preference = systemId;
if (preference == "GBC") if (preference == "GBC")
{ {
// We want to treat GBC the same as GB // We want to treat GBC the same as GB

View File

@ -54,7 +54,7 @@ namespace BizHawk.Client.Common
/// When initializing a movie, it will be stored until Rom loading processes have been completed, then it will be moved to the Movie property /// When initializing a movie, it will be stored until Rom loading processes have been completed, then it will be moved to the Movie property
/// If an existing movie is still active, it will remain in the Movie property while the new movie is queued /// If an existing movie is still active, it will remain in the Movie property while the new movie is queued
/// </summary> /// </summary>
void QueueNewMovie(IMovie movie, bool record, IEmulator emulator); void QueueNewMovie(IMovie movie, bool record, string systemId);
/// <summary> /// <summary>
/// Sets the Movie property with the QueuedMovie, clears the queued movie, and starts the new movie /// Sets the Movie property with the QueuedMovie, clears the queued movie, and starts the new movie

View File

@ -17,7 +17,7 @@ namespace BizHawk.Client.EmuHawk
try try
{ {
MovieSession.QueueNewMovie(movie, record, Emulator); MovieSession.QueueNewMovie(movie, record, Emulator.SystemId);
} }
catch (MoviePlatformMismatchException ex) catch (MoviePlatformMismatchException ex)
{ {