From cf8127c55350d5a67cef9d138eba66ffb12a111d Mon Sep 17 00:00:00 2001 From: "ALIENJACK\\alien" Date: Tue, 18 Mar 2025 11:23:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DGetBinding=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E7=9A=84InputControl=E5=AF=B9=E8=B1=A1=E5=B9=B6=E4=B8=8D?= =?UTF-8?q?=E5=AE=8C=E6=95=B4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppSettings/KeyMapperSetting/KeyMapperSetting.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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