Fix LoadRamWatch logic, was always attempting to load it even when it was already loaded. Worse was that it was autoloading watch files anytime something interacted with it like the "add to ram watch" feature in ram search

This commit is contained in:
adelikat 2019-12-02 17:19:58 -06:00
parent 44621446b1
commit 79d06bcb4a
1 changed files with 4 additions and 2 deletions

View File

@ -819,11 +819,13 @@ namespace BizHawk.Client.EmuHawk
public void LoadRamWatch(bool loadDialog) public void LoadRamWatch(bool loadDialog)
{ {
if (!IsLoaded<RamWatch>()) if (IsLoaded<RamWatch>())
{ {
Load<RamWatch>(); return;
} }
Load<RamWatch>();
if (IsAvailable<RamWatch>()) // Just because we attempted to load it, doesn't mean it was, the current core may not have the correct dependencies if (IsAvailable<RamWatch>()) // Just because we attempted to load it, doesn't mean it was, the current core may not have the correct dependencies
{ {
if (Global.Config.RecentWatches.AutoLoad && !Global.Config.RecentWatches.Empty) if (Global.Config.RecentWatches.AutoLoad && !Global.Config.RecentWatches.Empty)