Add lock for input proxy.
This commit is contained in:
@@ -102,10 +102,13 @@ namespace Cryville.Crtr {
|
||||
#region Handling
|
||||
public void Activate() { foreach (var src in _sproxies.Keys) src.Handler.Activate(); }
|
||||
public void Deactivate() { foreach (var src in _sproxies.Keys) src.Handler.Deactivate(); }
|
||||
readonly object _lock = new object();
|
||||
void OnInput(InputIdentifier id, InputVector vec) {
|
||||
InputProxyEntry proxy;
|
||||
if (_sproxies.TryGetValue(id.Source, out proxy)) {
|
||||
OnInput(id, vec, proxy.Target);
|
||||
lock (_lock) {
|
||||
InputProxyEntry proxy;
|
||||
if (_sproxies.TryGetValue(id.Source, out proxy)) {
|
||||
OnInput(id, vec, proxy.Target);
|
||||
}
|
||||
}
|
||||
}
|
||||
static readonly int _var_value = IdentifierManager.SharedInstance.Request("value");
|
||||
|
Reference in New Issue
Block a user