Fix autoloading of Ram Watch

This commit is contained in:
adelikat 2015-01-02 15:19:18 +00:00
parent 47d1e480da
commit 38c1ffa1e9
2 changed files with 7 additions and 6 deletions

View File

@ -729,15 +729,16 @@ namespace BizHawk.Client.EmuHawk
public void LoadRamWatch(bool loadDialog)
{
if (Global.Emulator.HasMemoryDomains())
if (!IsLoaded<RamWatch>() && Global.Config.RecentWatches.AutoLoad && !Global.Config.RecentWatches.Empty)
Load<RamWatch>();
if (Global.Config.RecentWatches.AutoLoad && !Global.Config.RecentWatches.Empty)
{
GlobalWin.Tools.RamWatch.LoadFileFromRecent(Global.Config.RecentWatches.MostRecent);
RamWatch.LoadFileFromRecent(Global.Config.RecentWatches.MostRecent);
}
if (loadDialog)
if (!loadDialog)
{
GlobalWin.Tools.Load<RamWatch>();
Get<RamWatch>().Close();
}
}

View File

@ -156,7 +156,7 @@ namespace BizHawk.Client.EmuHawk
public void LoadFileFromRecent(string path)
{
var ask_result = true;
if (_watches != null && _watches.Changes)
if (_watches.Changes)
{
ask_result = AskSaveChanges();
}