forked from sin365/AxibugEmuOnline
修复GetBinding返回的InputControl对象并不完整的问题
This commit is contained in:
parent
49c893fdab
commit
cf8127c553
@ -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<InputDevice.InputControl> m_caches = new List<InputDevice.InputControl>();
|
||||
public IEnumerable<InputDevice.InputControl> 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<InputDevice.InputControl>();
|
||||
return m_caches;
|
||||
}
|
||||
|
||||
public bool AnyKeyDown()
|
||||
@ -337,5 +341,6 @@ namespace AxibugEmuOnline.Client.Settings
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user