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 Stop()
=> _mainForm.StopMovie();
public void Stop(bool saveChanges = true)
=> _mainForm.StopMovie(saveChanges: saveChanges);
public double GetFps()
{

View File

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

View File

@ -93,9 +93,9 @@ namespace BizHawk.Client.Common
=> APIs.Movie.SetRerecordCounting(counting);
[LuaMethodExample("movie.stop( );")]
[LuaMethod("stop", "Stops the current movie")]
public void Stop()
=> APIs.Movie.Stop();
[LuaMethod("stop", "Stops the current movie. Pass false to discard changes.")]
public void Stop(bool saveChanges = true)
=> APIs.Movie.Stop(saveChanges);
[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")]