MainForm - setter for Config property
This commit is contained in:
parent
8f6f8f72cb
commit
bfb39e79d0
|
@ -1335,7 +1335,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void LoadConfigMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config = ConfigService.Load<Config>(PathManager.DefaultIniPath);
|
||||
Config = ConfigService.Load<Config>(PathManager.DefaultIniPath);
|
||||
Config.ResolveDefaults();
|
||||
InitControls(); // rebind hotkeys
|
||||
AddOnScreenMessage($"Config file loaded: {PathManager.DefaultIniPath}");
|
||||
|
@ -1353,7 +1353,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
if (ofd.ShowHawkDialog().IsOk())
|
||||
{
|
||||
Global.Config = ConfigService.Load<Config>(ofd.FileName);
|
||||
Config = ConfigService.Load<Config>(ofd.FileName);
|
||||
Config.ResolveDefaults();
|
||||
InitControls(); // rebind hotkeys
|
||||
AddOnScreenMessage($"Config file loaded: {ofd.FileName}");
|
||||
|
|
|
@ -800,7 +800,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private ISoundProvider _currentSoundProvider = new NullSound(44100 / 60); // Reasonable default until we have a core instance
|
||||
|
||||
private Config Config => Global.Config;
|
||||
private Config Config
|
||||
{
|
||||
get => Global.Config;
|
||||
set => Global.Config = value;
|
||||
}
|
||||
|
||||
private ToolManager Tools => GlobalWin.Tools;
|
||||
private DisplayManager DisplayManager => GlobalWin.DisplayManager;
|
||||
private IMovieSession MovieSession => Global.MovieSession;
|
||||
|
|
Loading…
Reference in New Issue