diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/KeyMapperSetting.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/KeyMapperSetting.cs index 36d1a1e1..53ff6296 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/KeyMapperSetting.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/KeyMapperSetting.cs @@ -2,6 +2,7 @@ using AxibugEmuOnline.Client.InputDevices; using AxibugProtobuf; using System; +using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; @@ -307,18 +308,21 @@ namespace AxibugEmuOnline.Client.Settings return settingList[settingSlot]; } + private List m_caches = new List(); public IEnumerable GetBinding(T emuBtn) { + m_caches.Clear(); + foreach (var mapSettings in m_mapSetting.Values) { mapSettings.TryGetValue(emuBtn, out var bindControls); if (bindControls != null) { - return bindControls; + m_caches.AddRange(bindControls); } } - return Enumerable.Empty(); + return m_caches; } public bool AnyKeyDown() @@ -337,5 +341,6 @@ namespace AxibugEmuOnline.Client.Settings return false; } } + } } \ No newline at end of file