Add `saveChanges` parameter to `IMovieApi.Stop`/`movie.stop`

This commit is contained in:
YoshiRulz 2022-12-07 03:01:51 +10:00 committed by James Groom
parent e0a7a39b0d
commit 0076c8802b
3 changed files with 8 additions and 6 deletions

View File

@ -106,8 +106,8 @@ namespace BizHawk.Client.Common
public void SetRerecordCounting(bool counting) => _movieSession.Movie.IsCountingRerecords = counting; public void SetRerecordCounting(bool counting) => _movieSession.Movie.IsCountingRerecords = counting;
public void Stop() public void Stop(bool saveChanges = true)
=> _mainForm.StopMovie(); => _mainForm.StopMovie(saveChanges: saveChanges);
public double GetFps() public double GetFps()
{ {

View File

@ -19,7 +19,9 @@ namespace BizHawk.Client.Common
void SetReadOnly(bool readOnly); void SetReadOnly(bool readOnly);
void SetRerecordCount(ulong count); void SetRerecordCount(ulong count);
void SetRerecordCounting(bool counting); void SetRerecordCounting(bool counting);
void Stop();
void Stop(bool saveChanges = true);
double GetFps(); double GetFps();
IReadOnlyDictionary<string, string> GetHeader(); IReadOnlyDictionary<string, string> GetHeader();
IReadOnlyList<string> GetComments(); IReadOnlyList<string> GetComments();

View File

@ -93,9 +93,9 @@ namespace BizHawk.Client.Common
=> APIs.Movie.SetRerecordCounting(counting); => APIs.Movie.SetRerecordCounting(counting);
[LuaMethodExample("movie.stop( );")] [LuaMethodExample("movie.stop( );")]
[LuaMethod("stop", "Stops the current movie")] [LuaMethod("stop", "Stops the current movie. Pass false to discard changes.")]
public void Stop() public void Stop(bool saveChanges = true)
=> APIs.Movie.Stop(); => APIs.Movie.Stop(saveChanges);
[LuaMethodExample("local domovget = movie.getfps( );")] [LuaMethodExample("local domovget = movie.getfps( );")]
[LuaMethod("getfps", "If a movie is loaded, gets the frames per second used by the movie to determine the movie length time")] [LuaMethod("getfps", "If a movie is loaded, gets the frames per second used by the movie to determine the movie length time")]