From 2356fd744876ece63fed1fe380c34780a898ca8d Mon Sep 17 00:00:00 2001 From: sin365 <353374337@qq.com> Date: Wed, 20 Aug 2025 15:21:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?inputsystem=20=E8=BE=93=E5=85=A5=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InputDevicesManager/InputDevicesManager.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/InputDevicesManager/InputDevicesManager.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/InputDevicesManager/InputDevicesManager.cs index eb323aa1..c887489a 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/InputDevicesManager/InputDevicesManager.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/InputDevicesManager/InputDevicesManager.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using UnityEngine; +using UnityEngine.InputSystem; namespace AxibugEmuOnline.Client.InputDevices { @@ -77,6 +78,20 @@ namespace AxibugEmuOnline.Client.InputDevices public void Update() { foreach (var device in m_devices.Values) device.Update(); + + foreach (var device in InputSystem.devices) + { + if (device is Mouse) + continue; + for (int i = 0; i < device.allControls.Count; i++) + { + if (device.allControls[i].IsPressed(0)) + { + Debug.Log($"{device.displayName}| {device.allControls[i].displayName}|{device.allControls[i].name}"); + } + } + } + } } } \ No newline at end of file From 224e0d112622abedc9515956990a9ffb59475e6c Mon Sep 17 00:00:00 2001 From: sin365 <353374337@qq.com> Date: Wed, 20 Aug 2025 15:22:02 +0800 Subject: [PATCH 2/2] =?UTF-8?q?axihttp=20DNS=E7=BA=BF=E7=A8=8B=E5=AE=89?= =?UTF-8?q?=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Script/AppMain/AxiHttp/AxiHttp.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiHttp/AxiHttp.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiHttp/AxiHttp.cs index 9b651903..82c200be 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiHttp/AxiHttp.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/AxiHttp/AxiHttp.cs @@ -166,20 +166,23 @@ public static class AxiHttp public static IPAddress GetDnsIP(string str) { - if (!dictIP2Address.ContainsKey(str)) + lock (dictIP2Address) { - IPHostEntry host = Dns.GetHostEntry(str); - IPAddress ip = null; - foreach (var item in host.AddressList) + if (!dictIP2Address.ContainsKey(str)) { - if (item.AddressFamily == AddressFamily.InterNetwork) + IPHostEntry host = Dns.GetHostEntry(str); + IPAddress ip = null; + foreach (var item in host.AddressList) { - ip = item; break; + if (item.AddressFamily == AddressFamily.InterNetwork) + { + ip = item; break; + } } + dictIP2Address[str] = ip; } - dictIP2Address[str] = ip; + return dictIP2Address[str]; } - return dictIP2Address[str]; } public enum AxiDownLoadMode