misc: Move configuration management to the Ryujinx project (#2269)
* Decouple configuration from Ryujinx.HLE and Ryujinx.Input * Move Configuration to the Ryujinx project
This commit is contained in:
parent
f48828351c
commit
bec67dbef7
28 changed files with 387 additions and 215 deletions
|
@ -4,7 +4,7 @@ using Ryujinx.Common.Configuration.Hid;
|
|||
using Ryujinx.Common.Configuration.Hid.Controller;
|
||||
using Ryujinx.Common.Configuration.Hid.Controller.Motion;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Configuration;
|
||||
using Ryujinx.Input.HLE;
|
||||
using Ryujinx.Input.Motion.CemuHook.Protocol;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -29,12 +29,14 @@ namespace Ryujinx.Input.Motion.CemuHook
|
|||
|
||||
private readonly bool[] _clientErrorStatus = new bool[Enum.GetValues(typeof(PlayerIndex)).Length];
|
||||
private readonly long[] _clientRetryTimer = new long[Enum.GetValues(typeof(PlayerIndex)).Length];
|
||||
private NpadManager _npadManager;
|
||||
|
||||
public Client()
|
||||
public Client(NpadManager npadManager)
|
||||
{
|
||||
_hosts = new Dictionary<int, IPEndPoint>();
|
||||
_motionData = new Dictionary<int, Dictionary<int, MotionInput>>();
|
||||
_clients = new Dictionary<int, UdpClient>();
|
||||
_npadManager = npadManager;
|
||||
_hosts = new Dictionary<int, IPEndPoint>();
|
||||
_motionData = new Dictionary<int, Dictionary<int, MotionInput>>();
|
||||
_clients = new Dictionary<int, UdpClient>();
|
||||
|
||||
CloseClients();
|
||||
}
|
||||
|
@ -323,7 +325,7 @@ namespace Ryujinx.Input.Motion.CemuHook
|
|||
|
||||
ulong timestamp = inputData.MotionTimestamp;
|
||||
|
||||
InputConfig config = ConfigurationState.Instance.Hid.InputConfig.Value.Find(x => x.PlayerIndex == (PlayerIndex)clientId);
|
||||
InputConfig config = _npadManager.GetPlayerInputConfigByIndex(clientId);
|
||||
|
||||
lock (_motionData)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue