mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-23 23:21:49 +01:00
Merge branch 'Yuki-nyan-ryochan7' into jay
This commit is contained in:
commit
1f85128c22
@ -150,6 +150,7 @@ namespace DS4Windows
|
||||
public DateTime lastActive = DateTime.UtcNow;
|
||||
public DateTime firstActive = DateTime.UtcNow;
|
||||
private bool charging;
|
||||
private bool isNacon = false;
|
||||
private bool outputRumble = false;
|
||||
private int warnInterval = WARN_INTERVAL_USB;
|
||||
public int getWarnInterval()
|
||||
@ -428,6 +429,11 @@ namespace DS4Windows
|
||||
micAudio = new DS4Audio(DS4Library.CoreAudio.DataFlow.Capture);
|
||||
}
|
||||
|
||||
else if (tempAttr.VendorId == 0x146B)
|
||||
{
|
||||
isNacon = true;
|
||||
}
|
||||
|
||||
synced = true;
|
||||
}
|
||||
else
|
||||
@ -971,7 +977,7 @@ namespace DS4Windows
|
||||
pbAccel[i-6] = pbInput[i];
|
||||
}
|
||||
}
|
||||
sixAxis.handleSixaxis(gyro, accel, cState, elapsedDeltaTime);
|
||||
sixAxis.handleSixaxis(gyro, accel, cState, elapsedDeltaTime, isNacon);
|
||||
|
||||
/* Debug output of incoming HID data:
|
||||
if (cState.L2 == 0xff && cState.R2 == 0xff)
|
||||
|
@ -40,6 +40,7 @@ namespace DS4Windows
|
||||
new VidPidInfo(SONY_VID, 0x09CC),
|
||||
new VidPidInfo(RAZER_VID, 0x1000),
|
||||
new VidPidInfo(NACON_VID, 0x0D01),
|
||||
new VidPidInfo(NACON_VID, 0x0D02),
|
||||
new VidPidInfo(HORI_VID, 0x00EE), // Hori PS4 Mini Wired Gamepad
|
||||
new VidPidInfo(0x7545, 0x0104)
|
||||
};
|
||||
|
@ -218,7 +218,7 @@ namespace DS4Windows
|
||||
}
|
||||
|
||||
public void handleSixaxis(byte[] gyro, byte[] accel, DS4State state,
|
||||
double elapsedDelta)
|
||||
double elapsedDelta, bool disableCalibs)
|
||||
{
|
||||
int currentYaw = (short)((ushort)(gyro[3] << 8) | gyro[2]);
|
||||
int currentPitch = (short)((ushort)(gyro[1] << 8) | gyro[0]);
|
||||
@ -227,7 +227,10 @@ namespace DS4Windows
|
||||
int AccelY = (short)((ushort)(accel[3] << 8) | accel[2]);
|
||||
int AccelZ = (short)((ushort)(accel[5] << 8) | accel[4]);
|
||||
|
||||
applyCalibs(ref currentYaw, ref currentPitch, ref currentRoll, ref AccelX, ref AccelY, ref AccelZ);
|
||||
if (!disableCalibs)
|
||||
{
|
||||
applyCalibs(ref currentYaw, ref currentPitch, ref currentRoll, ref AccelX, ref AccelY, ref AccelZ);
|
||||
}
|
||||
|
||||
SixAxisEventArgs args = null;
|
||||
if (AccelX != 0 || AccelY != 0 || AccelZ != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user