Some fixes to movie mode extensions, these aren't bugs, yet, as the scenarios never occur

This commit is contained in:
adelikat 2020-05-23 13:16:20 -05:00
parent 2e4609ff02
commit d0d526f746
1 changed files with 2 additions and 2 deletions

View File

@ -228,11 +228,11 @@ namespace BizHawk.Client.Common
public static class MovieExtensions
{
public static bool IsActive(this IMovie movie) => movie?.Mode != MovieMode.Inactive;
public static bool IsActive(this IMovie movie) => movie != null && movie.Mode != MovieMode.Inactive;
public static bool NotActive(this IMovie movie) => movie == null || movie.Mode == MovieMode.Inactive;
public static bool IsPlaying(this IMovie movie) => movie?.Mode == MovieMode.Play || movie?.Mode == MovieMode.Finished;
public static bool IsRecording(this IMovie movie) => movie?.Mode == MovieMode.Record;
public static bool IsFinished(this IMovie movie) => movie.Mode == MovieMode.Finished;
public static bool IsFinished(this IMovie movie) => movie?.Mode == MovieMode.Finished;
public static bool IsPlayingOrRecording(this IMovie movie) => movie?.Mode == MovieMode.Play || movie?.Mode == MovieMode.Record;