diff --git a/BizHawk.Emulation.Common/Base Implementations/MemoryDomain.cs b/BizHawk.Emulation.Common/Base Implementations/MemoryDomain.cs index 7a878e702d..83b6eb98be 100644 --- a/BizHawk.Emulation.Common/Base Implementations/MemoryDomain.cs +++ b/BizHawk.Emulation.Common/Base Implementations/MemoryDomain.cs @@ -217,6 +217,11 @@ namespace BizHawk.Emulation.Common private MemoryDomain _mainMemory; private MemoryDomain _systemBus; + public bool Has(string name) + { + return this.FirstOrDefault((md) => md.Name == name) != null; + } + public MemoryDomainList(IList domains) : base(domains) { diff --git a/BizHawk.Emulation.Common/Interfaces/IMemoryDomains.cs b/BizHawk.Emulation.Common/Interfaces/IMemoryDomains.cs index 5ed18f76a3..c5054def69 100644 --- a/BizHawk.Emulation.Common/Interfaces/IMemoryDomains.cs +++ b/BizHawk.Emulation.Common/Interfaces/IMemoryDomains.cs @@ -18,5 +18,7 @@ namespace BizHawk.Emulation.Common bool HasSystemBus { get; } MemoryDomain SystemBus { get; set; } + + bool Has(string name); } }