diff --git a/BizHawk.Emulation.Common/Interfaces/CoreComms.cs b/BizHawk.Emulation.Common/Interfaces/CoreComms.cs index 4bded0409b..1bf1dac908 100644 --- a/BizHawk.Emulation.Common/Interfaces/CoreComms.cs +++ b/BizHawk.Emulation.Common/Interfaces/CoreComms.cs @@ -118,43 +118,28 @@ namespace BizHawk.Emulation.Common private bool logging; } - public class InputCallbackSystem + public class InputCallbackSystem : List { - private readonly List _list = new List(); - - public void Add(Action action) - { - _list.Add(action); - } - public void Call() { - foreach (var action in _list) + foreach (var action in this) { action(); } } - public void Remove(Action action) - { - _list.Remove(action); - } - public void RemoveAll(IEnumerable actions) { foreach (var action in actions) { - _list.Remove(action); + this.Remove(action); } } - public void Clear() + public bool Has { - _list.Clear(); + get { return this.Any(); } } - - // why was this missing? - public bool Has { get { return _list.Any(); } } } public class MemoryCallbackSystem