mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-03-01 05:15:21 +01:00
Merge branch 'jay' into vigem-udpserver
This commit is contained in:
commit
2ef6fe312f
@ -705,6 +705,8 @@ namespace DS4Windows
|
|||||||
uint HamSeed = 2351727372;
|
uint HamSeed = 2351727372;
|
||||||
|
|
||||||
private unsafe void performDs4Input()
|
private unsafe void performDs4Input()
|
||||||
|
{
|
||||||
|
unchecked
|
||||||
{
|
{
|
||||||
firstActive = DateTime.UtcNow;
|
firstActive = DateTime.UtcNow;
|
||||||
NativeMethods.HidD_SetNumInputBuffers(hDevice.safeReadHandle.DangerousGetHandle(), 2);
|
NativeMethods.HidD_SetNumInputBuffers(hDevice.safeReadHandle.DangerousGetHandle(), 2);
|
||||||
@ -759,7 +761,7 @@ namespace DS4Windows
|
|||||||
//Array.Copy(btInputReport, 2, inputReport, 0, inputReport.Length);
|
//Array.Copy(btInputReport, 2, inputReport, 0, inputReport.Length);
|
||||||
fixed (byte* byteP = &btInputReport[2], imp = inputReport)
|
fixed (byte* byteP = &btInputReport[2], imp = inputReport)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < BT_INPUT_REPORT_LENGTH-2;j++)
|
for (int j = 0; j < BT_INPUT_REPORT_LENGTH - 2; j++)
|
||||||
{
|
{
|
||||||
imp[j] = byteP[j];
|
imp[j] = byteP[j];
|
||||||
}
|
}
|
||||||
@ -979,7 +981,7 @@ namespace DS4Windows
|
|||||||
|
|
||||||
for (int i = 6; i < 12; i++)
|
for (int i = 6; i < 12; i++)
|
||||||
{
|
{
|
||||||
pbAccel[i-6] = pbInput[i];
|
pbAccel[i - 6] = pbInput[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
sixAxis.handleSixaxis(pbGyro, pbAccel, cState, elapsedDeltaTime);
|
sixAxis.handleSixaxis(pbGyro, pbAccel, cState, elapsedDeltaTime);
|
||||||
@ -1089,6 +1091,7 @@ namespace DS4Windows
|
|||||||
error = string.Empty;
|
error = string.Empty;
|
||||||
|
|
||||||
cState.CopyTo(pState);
|
cState.CopyTo(pState);
|
||||||
|
}
|
||||||
|
|
||||||
lock (eventQueueLock)
|
lock (eventQueueLock)
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Security;
|
||||||
using Microsoft.Win32.SafeHandles;
|
using Microsoft.Win32.SafeHandles;
|
||||||
namespace DS4Windows
|
namespace DS4Windows
|
||||||
{
|
{
|
||||||
|
[SuppressUnmanagedCodeSecurity]
|
||||||
internal static class NativeMethods
|
internal static class NativeMethods
|
||||||
{
|
{
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user