Skip to content

Commit 6c8d4c5

Browse files
committed
Clear MovieSession._queuedMovie if rom load fails (resolves #3582)
for #3582, `MovieSession.QueuedCoreName`, which gets passed to `RomLoader`, evaluated to a nonexistent core name and couldn't be cleared
1 parent f565eee commit 6c8d4c5

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/BizHawk.Client.Common/movie/MovieSession.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ public void RunQueuedMovie(bool recordMode, IEmulator emulator)
261261
}
262262
}
263263

264+
public void AbortQueuedMovie()
265+
=> _queuedMovie = null;
266+
264267
public void StopMovie(bool saveChanges = true)
265268
{
266269
if (Movie.IsActive())

src/BizHawk.Client.Common/movie/interfaces/IMovieSession.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ public interface IMovieSession
8484
/// </summary>
8585
void RunQueuedMovie(bool recordMode, IEmulator emulator);
8686

87+
/// <summary>clears the queued movie</summary>
88+
void AbortQueuedMovie();
89+
8790
void StopMovie(bool saveChanges = true);
8891

8992
/// <summary>

src/BizHawk.Client.EmuHawk/MainForm.Movie.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public bool StartNewMovie(IMovie movie, bool record)
4848
}
4949
finally
5050
{
51+
MovieSession.AbortQueuedMovie();
5152
Config.PreferredCores = oldPreferredCores;
5253
}
5354

0 commit comments

Comments
 (0)