persist TAStudio max undo levels to config

- resolves #3478
This commit is contained in:
Morilli 2024-10-10 20:57:25 +02:00
parent 4b60a90c78
commit c190ceb7f2
3 changed files with 4 additions and 2 deletions

View File

@ -795,7 +795,7 @@ namespace BizHawk.Client.EmuHawk
if (val > 0)
{
CurrentTasMovie.ChangeLog.MaxSteps = val;
Settings.MaxUndoSteps = CurrentTasMovie.ChangeLog.MaxSteps = val;
}
}
}

View File

@ -116,6 +116,7 @@ namespace BizHawk.Client.EmuHawk
public bool BindMarkersToInput { get; set; }
public bool CopyIncludesFrameNo { get; set; }
public TAStudioPalette Palette { get; set; }
public int MaxUndoSteps { get; set; } = 100;
}
public TAStudio()
@ -541,6 +542,7 @@ namespace BizHawk.Client.EmuHawk
movie.InputRollSettingsForSave = () => TasView.UserSettingsSerialized();
movie.BindMarkersToInput = Settings.BindMarkersToInput;
movie.GreenzoneInvalidated = GreenzoneInvalidated;
movie.ChangeLog.MaxSteps = Settings.MaxUndoSteps;
movie.PropertyChanged += TasMovie_OnPropertyChanged;
SuspendLayout();

View File

@ -164,7 +164,7 @@ namespace BizHawk.Client.EmuHawk
private void MaxStepsNum_ValueChanged(object sender, EventArgs e)
{
Log.MaxSteps = (int)MaxStepsNum.Value;
_tastudio.Settings.MaxUndoSteps = Log.MaxSteps = (int)MaxStepsNum.Value;
}
}
}