diff --git a/Qwilight/Qwilight/System/ControllerSystem/ControllerSystem.cs b/Qwilight/Qwilight/System/ControllerSystem/ControllerSystem.cs index caa4e00..1914e6e 100644 --- a/Qwilight/Qwilight/System/ControllerSystem/ControllerSystem.cs +++ b/Qwilight/Qwilight/System/ControllerSystem/ControllerSystem.cs @@ -54,7 +54,7 @@ readonly HandlingController _handlingControllerDInput = new HandlingController(rawInput => ViewModels.Instance.InputValue.OnDInputLower(rawInput), rawInput => ViewModels.Instance.InputStandardControllerValue.OnDInputLower(rawInput), DefaultCompute.InputFlag.Controller); readonly HandlingController _handlingControllerXInput = new HandlingController(rawInput => ViewModels.Instance.InputValue.OnXInputLower(rawInput), rawInput => ViewModels.Instance.InputStandardControllerValue.OnXInputLower(rawInput), DefaultCompute.InputFlag.Controller); - readonly HandlingController handlingControllerWGI = new HandlingController(rawInput => ViewModels.Instance.InputValue.OnWGILower(rawInput), rawInput => ViewModels.Instance.InputStandardControllerValue.OnWGILower(rawInput), DefaultCompute.InputFlag.Controller); + readonly HandlingController _handlingControllerWGI = new HandlingController(rawInput => ViewModels.Instance.InputValue.OnWGILower(rawInput), rawInput => ViewModels.Instance.InputStandardControllerValue.OnWGILower(rawInput), DefaultCompute.InputFlag.Controller); double _failedVibration; public string[] Controllers { get; set; } = Array.Empty(); @@ -73,7 +73,7 @@ { _handlingControllerDInput.Init(); _handlingControllerXInput.Init(); - handlingControllerWGI.Init(); + _handlingControllerWGI.Init(); } public void HandleSystem(nint handle) @@ -900,7 +900,7 @@ var d = ((ushort)lastInput.Buttons & i) - ((ushort)data.Buttons & i); if (d == i) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -911,7 +911,7 @@ } else if (d == -i) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -923,7 +923,7 @@ } if (data.LeftTrigger == 0.0 && lastInput.LeftTrigger > data.LeftTrigger && mainWGILower.Remove("+LT")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -933,7 +933,7 @@ } else if (data.LeftTrigger == 1.0 && lastInput.LeftTrigger < data.LeftTrigger && mainWGILower.Add("+LT")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -943,7 +943,7 @@ } if (data.RightTrigger == 0.0 && lastInput.RightTrigger > data.RightTrigger && mainWGILower.Remove("+RT")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -953,7 +953,7 @@ } else if (data.RightTrigger == 1.0 && lastInput.RightTrigger < data.RightTrigger && mainWGILower.Add("+RT")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -965,7 +965,7 @@ { if (lastInput.LeftThumbstickX > data.LeftThumbstickX && mainWGILower.Add("-LTX")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -978,7 +978,7 @@ { if (lastInput.LeftThumbstickX < data.LeftThumbstickX && mainWGILower.Add("+LTX")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -991,7 +991,7 @@ { if (lastInput.LeftThumbstickX < data.LeftThumbstickX && mainWGILower.Remove("-LTX")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -1001,7 +1001,7 @@ } else if (lastInput.LeftThumbstickX > data.LeftThumbstickX && mainWGILower.Remove("+LTX")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -1014,7 +1014,7 @@ { if (lastInput.LeftThumbstickY > data.LeftThumbstickY && mainWGILower.Add("-LTY")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -1027,7 +1027,7 @@ { if (lastInput.LeftThumbstickY < data.LeftThumbstickY && mainWGILower.Add("+LTY")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -1040,7 +1040,7 @@ { if (lastInput.LeftThumbstickY < data.LeftThumbstickY && mainWGILower.Remove("-LTY")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -1050,7 +1050,7 @@ } else if (lastInput.LeftThumbstickY > data.LeftThumbstickY && mainWGILower.Remove("+LTY")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -1063,7 +1063,7 @@ { if (lastInput.RightThumbstickX > data.RightThumbstickX && mainWGILower.Add("-RTX")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -1076,7 +1076,7 @@ { if (lastInput.RightThumbstickX < data.RightThumbstickX && mainWGILower.Add("+RTX")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -1089,7 +1089,7 @@ { if (lastInput.RightThumbstickX < data.RightThumbstickX && mainWGILower.Remove("-RTX")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -1099,7 +1099,7 @@ } else if (lastInput.RightThumbstickX > data.RightThumbstickX && mainWGILower.Remove("+RTX")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -1112,7 +1112,7 @@ { if (lastInput.RightThumbstickY > data.RightThumbstickY && mainWGILower.Add("-RTY")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -1125,7 +1125,7 @@ { if (lastInput.RightThumbstickY < data.RightThumbstickY && mainWGILower.Add("+RTY")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -1138,7 +1138,7 @@ { if (lastInput.RightThumbstickY < data.RightThumbstickY && mainWGILower.Remove("-RTY")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -1148,7 +1148,7 @@ } else if (lastInput.RightThumbstickY > data.RightThumbstickY && mainWGILower.Remove("+RTY")) { - handlingControllerWGI.Input(new WGI + _handlingControllerWGI.Input(new WGI { Data = new GamepadReading { @@ -1280,7 +1280,7 @@ { while (Configure.Instance.ControllerInputAPI == InputAPI.WGI) { - handlingControllerWGI.HandleLooping(targetWGIControllers.Count > 0, onHandleWGI1000, onHandleWGI); + _handlingControllerWGI.HandleLooping(targetWGIControllers.Count > 0, onHandleWGI1000, onHandleWGI); } } finally