Tastudio - take the emuhawk context menu item "stop without saving" into account

This commit is contained in:
adelikat 2014-11-08 17:44:25 +00:00
parent 5c92adcaaa
commit 0578eb6436
4 changed files with 12 additions and 4 deletions

View File

@ -19,7 +19,7 @@
/// Should not be called directly.
/// <remarks>Like MainForm's StopMovie(), saving the movie is part of this function's responsibility.</remarks>
/// </summary>
void StopMovie();
void StopMovie(bool supressSave);
bool WantsToControlRewind { get; }

View File

@ -3502,7 +3502,7 @@ namespace BizHawk.Client.EmuHawk
{
if (IsSlave && master.WantsToControlStopMovie)
{
master.StopMovie();
master.StopMovie(!saveChanges);
}
else
{

View File

@ -2,7 +2,8 @@
{
public partial class TAStudio : IControlMainform
{
private bool _suppressAskSave = false;
public bool WantsToControlReadOnly { get { return false; } }
public void ToggleReadOnly()
{
@ -11,10 +12,12 @@
public bool WantsToControlStopMovie { get; private set; }
public void StopMovie()
public void StopMovie(bool supressSave)
{
this.Focus();
_suppressAskSave = supressSave;
NewTasMenuItem_Click(null, null);
_suppressAskSave = false;
}
public bool WantsToControlRewind { get { return true; } }

View File

@ -76,6 +76,11 @@ namespace BizHawk.Client.EmuHawk
public bool AskSaveChanges()
{
if (_suppressAskSave)
{
return true;
}
if (CurrentTasMovie != null && CurrentTasMovie.Changes)
{
GlobalWin.Sound.StopSound();