diff --git a/src/BizHawk.Client.EmuHawk/MainForm.Events.cs b/src/BizHawk.Client.EmuHawk/MainForm.Events.cs index 8a0833d1dd..d9d0b540d5 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -981,7 +981,7 @@ namespace BizHawk.Client.EmuHawk private void PathsMenuItem_Click(object sender, EventArgs e) { - using var form = new PathConfig(this, Config); + using var form = new PathConfig(this, Config, Game.System); form.ShowDialog(); } diff --git a/src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.cs b/src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.cs index 7c05e3f386..89bc2262f9 100644 --- a/src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.cs +++ b/src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.cs @@ -584,7 +584,7 @@ namespace BizHawk.Client.EmuHawk return; } - using var pathConfig = new PathConfig(_mainForm, GlobalWin.Config); + using var pathConfig = new PathConfig(_mainForm, GlobalWin.Config, GlobalWin.Game.System); pathConfig.ShowDialog(this); RefreshBasePath(); } diff --git a/src/BizHawk.Client.EmuHawk/config/PathConfig.cs b/src/BizHawk.Client.EmuHawk/config/PathConfig.cs index 79302dbd0f..a978465b1d 100644 --- a/src/BizHawk.Client.EmuHawk/config/PathConfig.cs +++ b/src/BizHawk.Client.EmuHawk/config/PathConfig.cs @@ -13,6 +13,7 @@ namespace BizHawk.Client.EmuHawk { private readonly Config _config; private readonly MainForm _mainForm; + private readonly string _currentSystemId; // All path text boxes should do some kind of error checking // Config path under base, config will default to %exe% @@ -41,10 +42,11 @@ namespace BizHawk.Client.EmuHawk "..\\" }; - public PathConfig(MainForm mainForm, Config config) + public PathConfig(MainForm mainForm, Config config, string currentSystemId) { _mainForm = mainForm; _config = config; + _currentSystemId = currentSystemId; InitializeComponent(); } @@ -59,7 +61,7 @@ namespace BizHawk.Client.EmuHawk private void SetDefaultFocusedTab() { - var tab = FindTabByName(GlobalWin.Game.System); + var tab = FindTabByName(_currentSystemId); if (tab != null) { PathTabControl.SelectTab(tab);