Debugger: Save debugger window size & bottom panel height

This commit is contained in:
Souryo 2016-11-26 20:58:27 -05:00
parent ba94e785dc
commit 8c209367a7
2 changed files with 15 additions and 0 deletions

View File

@ -88,6 +88,10 @@ namespace Mesen.GUI.Config
public int RamColumnCount = 2;
public float RamFontSize = 13;
public int WindowWidth = -1;
public int WindowHeight = -1;
public int BottomPanelHeight = -1;
public DebugInfo()
{
LeftView = new DebugViewInfo();

View File

@ -46,6 +46,12 @@ namespace Mesen.GUI.Debugger
this.mnuShowOnlyDisassembledCode.Checked = ConfigManager.Config.DebugInfo.ShowOnlyDisassembledCode;
this.mnuShowFunctionLabelLists.Checked = ConfigManager.Config.DebugInfo.ShowFunctionLabelLists;
this.Width = ConfigManager.Config.DebugInfo.WindowWidth;
this.Height = ConfigManager.Config.DebugInfo.WindowHeight;
if(ConfigManager.Config.DebugInfo.BottomPanelHeight > 0) {
this.splitContainer.SplitterDistance = ConfigManager.Config.DebugInfo.BottomPanelHeight;
}
_lastCodeWindow = ctrlDebuggerCode;
this.ctrlDebuggerCode.SetConfig(ConfigManager.Config.DebugInfo.LeftView);
@ -416,6 +422,11 @@ namespace Mesen.GUI.Debugger
protected override void OnFormClosed(FormClosedEventArgs e)
{
ConfigManager.Config.DebugInfo.WindowWidth = this.Width;
ConfigManager.Config.DebugInfo.WindowHeight = this.Height;
ConfigManager.Config.DebugInfo.BottomPanelHeight = this.splitContainer.SplitterDistance;
ConfigManager.ApplyChanges();
SaveWorkspace();
foreach(Form frm in this._childForms.ToArray()) {