Tastudio - take the emuhawk context menu item "stop without saving" into account
This commit is contained in:
parent
5c92adcaaa
commit
0578eb6436
|
@ -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; }
|
||||
|
||||
|
|
|
@ -3502,7 +3502,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (IsSlave && master.WantsToControlStopMovie)
|
||||
{
|
||||
master.StopMovie();
|
||||
master.StopMovie(!saveChanges);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -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; } }
|
||||
|
|
|
@ -76,6 +76,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public bool AskSaveChanges()
|
||||
{
|
||||
if (_suppressAskSave)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (CurrentTasMovie != null && CurrentTasMovie.Changes)
|
||||
{
|
||||
GlobalWin.Sound.StopSound();
|
||||
|
|
Loading…
Reference in New Issue