diff --git a/ControllerService/ControllerService.cs b/ControllerService/ControllerService.cs index 221b6afe3..a1f5bf0c4 100644 --- a/ControllerService/ControllerService.cs +++ b/ControllerService/ControllerService.cs @@ -164,7 +164,7 @@ private void UpdateVirtualController(HIDmode mode) throw new InvalidOperationException(); } - VirtualTarget.Submited += OnTargetSubmited; + VirtualTarget.Updated += OnTargetSubmited; VirtualTarget.Connected += OnTargetConnected; // VirtualTarget.Disconnected += OnTargetDisconnected; diff --git a/ControllerService/Targets/DualShock4Target.cs b/ControllerService/Targets/DualShock4Target.cs index 9b49ba913..71fad34fd 100644 --- a/ControllerService/Targets/DualShock4Target.cs +++ b/ControllerService/Targets/DualShock4Target.cs @@ -214,9 +214,9 @@ public override unsafe void UpdateReport(object sender, ElapsedEventArgs e) DS4OutDeviceExtras.CopyBytes(ref outDS4Report, rawOutReportEx); virtualController.SubmitRawReport(rawOutReportEx); - - base.SubmitReport(); } + + base.SubmitReport(); } } } diff --git a/ControllerService/Targets/ViGEmTarget.cs b/ControllerService/Targets/ViGEmTarget.cs index 61aac68bc..632c827bf 100644 --- a/ControllerService/Targets/ViGEmTarget.cs +++ b/ControllerService/Targets/ViGEmTarget.cs @@ -74,7 +74,7 @@ public void Girometer_ReadingChanged(XInputGirometer sender, Vector3 e) protected short LeftThumbX, LeftThumbY, RightThumbX, RightThumbY; public Timer UpdateTimer; - public event SubmitedEventHandler Submited; + public event SubmitedEventHandler Updated; public delegate void SubmitedEventHandler(ViGEmTarget target); public event ConnectedEventHandler Connected; @@ -161,6 +161,8 @@ public virtual void Disconnect() public virtual unsafe void UpdateReport(object sender, ElapsedEventArgs e) { + Updated?.Invoke(this); + lock (updateLock) { // update timestamp @@ -208,7 +210,6 @@ public virtual unsafe void UpdateReport(object sender, ElapsedEventArgs e) internal void SubmitReport() { - Submited?.Invoke(this); // force null position to avoid drifting ? AngularVelocity = new(); diff --git a/ControllerService/Targets/Xbox360Target.cs b/ControllerService/Targets/Xbox360Target.cs index 238591051..45ad50aeb 100644 --- a/ControllerService/Targets/Xbox360Target.cs +++ b/ControllerService/Targets/Xbox360Target.cs @@ -112,9 +112,9 @@ public override unsafe void UpdateReport(object sender, ElapsedEventArgs e) virtualController.SetSliderValue(Xbox360Slider.RightTrigger, Gamepad.RightTrigger); virtualController.SubmitReport(); - - base.SubmitReport(); } + + base.SubmitReport(); } } }