tastudio: allow exporting a named state

This commit is contained in:
feos 2017-02-24 21:58:41 +03:00
parent 4a52b60ca5
commit 5c91c2f98c
2 changed files with 11 additions and 1 deletions

View File

@ -3922,6 +3922,11 @@ namespace BizHawk.Client.EmuHawk
return;
}
// allow named state export for tastudio, since it's safe, unlike loading one
// todo: make it not save laglog in that case
if (GlobalWin.Tools.IsLoaded<TAStudio>())
GlobalWin.Tools.TAStudio.NamedStatePending = true;
if (IsSlave && master.WantsToControlSavestates)
{
master.SaveStateAs();
@ -3950,6 +3955,9 @@ namespace BizHawk.Client.EmuHawk
{
SaveState(sfd.FileName, sfd.FileName, false);
}
if (GlobalWin.Tools.IsLoaded<TAStudio>())
GlobalWin.Tools.TAStudio.NamedStatePending = false;
}
private void LoadStateAs()

View File

@ -6,7 +6,9 @@ namespace BizHawk.Client.EmuHawk
{
private bool _suppressAskSave = false;
public bool WantsToControlSavestates { get { return true; } }
public bool NamedStatePending = false;
public bool WantsToControlSavestates { get { return !NamedStatePending; } }
public void SaveState()
{