From e73a66b07eaf3cc8dd0ee9ea421a3c86167183bc Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 12 Nov 2016 11:46:32 -0600 Subject: [PATCH] When ram watch is open with a file open, and loading another rom, only keep the ram watch file open if all the domains are compatible, else close it, addresses #285. There is arguably not a black and white expectation in this scenario but I think this is marginally more expected than exceptions and erroneous watch values --- BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs index 161ad0c479..c99095a7ef 100644 --- a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs +++ b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs @@ -216,11 +216,15 @@ namespace BizHawk.Client.EmuHawk return; } - if (_watches != null && !string.IsNullOrWhiteSpace(_watches.CurrentFileName)) + if (_watches != null + && !string.IsNullOrWhiteSpace(_watches.CurrentFileName) + && _watches.All(w => _memoryDomains.Contains(w.Domain))) { _watches.RefreshDomains(_memoryDomains); _watches.Reload(); UpdateStatusBar(); + + } else {