diff --git a/BizHawk.Client.EmuHawk/MainForm.Events.cs b/BizHawk.Client.EmuHawk/MainForm.Events.cs index e7bf6c6740..b558c4eb02 100644 --- a/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -1376,10 +1376,7 @@ namespace BizHawk.Client.EmuHawk private void LoadConfigMenuItem_Click(object sender, EventArgs e) { - Config = ConfigService.Load(Config.DefaultIniPath); - Config.ResolveDefaults(); - InitControls(); // rebind hotkeys - AddOnScreenMessage($"Config file loaded: {Config.DefaultIniPath}"); + LoadConfigFile(Config.DefaultIniPath); } private void LoadConfigFromMenuItem_Click(object sender, EventArgs e) @@ -1394,10 +1391,7 @@ namespace BizHawk.Client.EmuHawk if (ofd.ShowHawkDialog().IsOk()) { - Config = ConfigService.Load(ofd.FileName); - Config.ResolveDefaults(); - InitControls(); // rebind hotkeys - AddOnScreenMessage($"Config file loaded: {ofd.FileName}"); + LoadConfigFile(ofd.FileName); } } diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 1dbf18fdfe..65be34780c 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -2798,6 +2798,15 @@ namespace BizHawk.Client.EmuHawk } } + private void LoadConfigFile(string iniPath) + { + Config = ConfigService.Load(iniPath); + Config.ResolveDefaults(); + InitControls(); // rebind hotkeys + InputManager.SyncControls(Emulator, Config); + AddOnScreenMessage($"Config file loaded: {iniPath}"); + } + #endregion #region Frame Loop