mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-23 01:39:17 +01:00
Merge branch 'jay' into udpserver
This commit is contained in:
commit
f11095fb5e
@ -3124,114 +3124,50 @@ namespace DS4Windows
|
||||
{
|
||||
case DS4Controls.LXNeg:
|
||||
{
|
||||
if (!analog)
|
||||
{
|
||||
double angle = cState.LSAngle;
|
||||
result = cState.LX < 127 && (angle >= 210 && angle <= 330);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = cState.LX < 127;
|
||||
}
|
||||
|
||||
double angle = cState.LSAngle;
|
||||
result = cState.LX < 127 && (angle >= 210 && angle <= 330);
|
||||
break;
|
||||
}
|
||||
case DS4Controls.LYNeg:
|
||||
{
|
||||
if (!analog)
|
||||
{
|
||||
double angle = cState.LSAngle;
|
||||
result = cState.LY < 127 && (angle >= 300 || angle <= 60);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = cState.LY < 127;
|
||||
}
|
||||
|
||||
double angle = cState.LSAngle;
|
||||
result = cState.LY < 127 && (angle >= 300 || angle <= 60);
|
||||
break;
|
||||
}
|
||||
case DS4Controls.RXNeg:
|
||||
{
|
||||
if (!analog)
|
||||
{
|
||||
double angle = cState.RSAngle;
|
||||
result = cState.RX < 127 && (angle >= 210 && angle <= 330);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = cState.RX < 127;
|
||||
}
|
||||
|
||||
double angle = cState.RSAngle;
|
||||
result = cState.RX < 127 && (angle >= 210 && angle <= 330);
|
||||
break;
|
||||
}
|
||||
case DS4Controls.RYNeg:
|
||||
{
|
||||
if (!analog)
|
||||
{
|
||||
double angle = cState.RSAngle;
|
||||
result = cState.RY < 127 && (angle >= 300 || angle <= 60);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = cState.RY < 127;
|
||||
}
|
||||
|
||||
double angle = cState.RSAngle;
|
||||
result = cState.RY < 127 && (angle >= 300 || angle <= 60);
|
||||
break;
|
||||
}
|
||||
case DS4Controls.LXPos:
|
||||
{
|
||||
if (!analog)
|
||||
{
|
||||
double angle = cState.LSAngle;
|
||||
result = cState.LX > 127 && (angle >= 30 && angle <= 150);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = cState.LX > 127;
|
||||
}
|
||||
|
||||
double angle = cState.LSAngle;
|
||||
result = cState.LX > 127 && (angle >= 30 && angle <= 150);
|
||||
break;
|
||||
}
|
||||
case DS4Controls.LYPos:
|
||||
{
|
||||
if (!analog)
|
||||
{
|
||||
double angle = cState.LSAngle;
|
||||
result = cState.LY > 127 && (angle >= 120 && angle <= 240);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = cState.LY > 127;
|
||||
}
|
||||
|
||||
double angle = cState.LSAngle;
|
||||
result = cState.LY > 127 && (angle >= 120 && angle <= 240);
|
||||
break;
|
||||
}
|
||||
case DS4Controls.RXPos:
|
||||
{
|
||||
if (!analog)
|
||||
{
|
||||
double angle = cState.RSAngle;
|
||||
result = cState.RX > 127 && (angle >= 30 && angle <= 150);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = cState.RX > 127;
|
||||
}
|
||||
|
||||
double angle = cState.RSAngle;
|
||||
result = cState.RX > 127 && (angle >= 30 && angle <= 150);
|
||||
break;
|
||||
}
|
||||
case DS4Controls.RYPos:
|
||||
{
|
||||
if (!analog)
|
||||
{
|
||||
double angle = cState.RSAngle;
|
||||
result = cState.RY > 127 && (angle >= 120 && angle <= 240);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = cState.RY > 127;
|
||||
}
|
||||
|
||||
double angle = cState.RSAngle;
|
||||
result = cState.RY > 127 && (angle >= 120 && angle <= 240);
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
|
@ -251,15 +251,15 @@ namespace DS4Windows
|
||||
if (jitterCompenstation)
|
||||
{
|
||||
double absX = Math.Abs(xMotion);
|
||||
if (absX <= normX * 0.34)
|
||||
if (absX <= normX * 0.15)
|
||||
{
|
||||
xMotion = signX * Math.Pow(absX / 0.34f, 1.44) * 0.34;
|
||||
xMotion = signX * Math.Pow(absX / 0.15f, 1.408) * 0.15;
|
||||
}
|
||||
|
||||
double absY = Math.Abs(yMotion);
|
||||
if (absY <= normY * 0.34)
|
||||
if (absY <= normY * 0.15)
|
||||
{
|
||||
yMotion = signY * Math.Pow(absY / 0.34f, 1.44) * 0.34;
|
||||
yMotion = signY * Math.Pow(absY / 0.15f, 1.408) * 0.15;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2835,7 +2835,7 @@ namespace DS4Windows
|
||||
if (postLoad && device < 4)
|
||||
{
|
||||
DS4Device tempDev = control.DS4Controllers[device];
|
||||
if (tempDev != null)
|
||||
if (tempDev != null && tempDev.isSynced())
|
||||
{
|
||||
tempDev.queueEvent(() =>
|
||||
{
|
||||
|
26
DS4Windows/DS4Forms/Hotkeys.Designer.cs
generated
26
DS4Windows/DS4Forms/Hotkeys.Designer.cs
generated
@ -40,6 +40,7 @@
|
||||
this.tPHotkeys = new System.Windows.Forms.TabPage();
|
||||
this.lbHotkeys = new System.Windows.Forms.Label();
|
||||
this.tPCredits = new System.Windows.Forms.TabPage();
|
||||
this.linkCurrentSite = new System.Windows.Forms.LinkLabel();
|
||||
this.linkTeokp = new System.Windows.Forms.LinkLabel();
|
||||
this.linkKiliansch = new System.Windows.Forms.LinkLabel();
|
||||
this.linkChamilsaan = new System.Windows.Forms.LinkLabel();
|
||||
@ -89,8 +90,6 @@
|
||||
this.coinTP = new System.Windows.Forms.TabPage();
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.makerSupportLinkLabel = new System.Windows.Forms.LinkLabel();
|
||||
this.linkCurrentSite = new System.Windows.Forms.LinkLabel();
|
||||
this.tCAbout.SuspendLayout();
|
||||
this.tPHotkeys.SuspendLayout();
|
||||
this.tPCredits.SuspendLayout();
|
||||
@ -186,6 +185,13 @@
|
||||
this.tPCredits.Name = "tPCredits";
|
||||
this.tPCredits.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// linkCurrentSite
|
||||
//
|
||||
resources.ApplyResources(this.linkCurrentSite, "linkCurrentSite");
|
||||
this.linkCurrentSite.Name = "linkCurrentSite";
|
||||
this.linkCurrentSite.TabStop = true;
|
||||
this.linkCurrentSite.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkCurrentSite_LinkClicked);
|
||||
//
|
||||
// linkTeokp
|
||||
//
|
||||
resources.ApplyResources(this.linkTeokp, "linkTeokp");
|
||||
@ -476,7 +482,6 @@
|
||||
resources.ApplyResources(this.flowLayoutPanel1, "flowLayoutPanel1");
|
||||
this.flowLayoutPanel1.Controls.Add(this.textBox2);
|
||||
this.flowLayoutPanel1.Controls.Add(this.linkDonate);
|
||||
this.flowLayoutPanel1.Controls.Add(this.makerSupportLinkLabel);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
//
|
||||
// textBox2
|
||||
@ -486,20 +491,6 @@
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.ReadOnly = true;
|
||||
//
|
||||
// makerSupportLinkLabel
|
||||
//
|
||||
resources.ApplyResources(this.makerSupportLinkLabel, "makerSupportLinkLabel");
|
||||
this.makerSupportLinkLabel.Name = "makerSupportLinkLabel";
|
||||
this.makerSupportLinkLabel.TabStop = true;
|
||||
this.makerSupportLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.MakerSupportLinkLabel_LinkClicked);
|
||||
//
|
||||
// linkCurrentSite
|
||||
//
|
||||
resources.ApplyResources(this.linkCurrentSite, "linkCurrentSite");
|
||||
this.linkCurrentSite.Name = "linkCurrentSite";
|
||||
this.linkCurrentSite.TabStop = true;
|
||||
this.linkCurrentSite.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkCurrentSite_LinkClicked);
|
||||
//
|
||||
// Hotkeys
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@ -583,7 +574,6 @@
|
||||
private System.Windows.Forms.Label lbpt;
|
||||
private System.Windows.Forms.Label lbPortugueseT;
|
||||
private System.Windows.Forms.LinkLabel linkTeokp;
|
||||
private System.Windows.Forms.LinkLabel makerSupportLinkLabel;
|
||||
private System.Windows.Forms.TabPage coinTP;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
private System.Windows.Forms.TextBox textBox2;
|
||||
|
@ -117,11 +117,6 @@ namespace DS4Windows
|
||||
Process.Start("https://github.com/teokp");
|
||||
}
|
||||
|
||||
private void MakerSupportLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
Process.Start("https://www.makersupport.com/Ryochan7");
|
||||
}
|
||||
|
||||
private void LinkCurrentSite_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
Process.Start("https://ryochan7.github.io/ds4windows-site/");
|
||||
|
@ -1930,33 +1930,6 @@ Monero: 49RvRMiMewaeez1Y2auxHmfMaAUYfhUpBem4ohzRJd9b5acPcxzh1icjnhZfjnYd1S7NQ57r
|
||||
<data name=">>textBox2.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="makerSupportLinkLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 108</value>
|
||||
</data>
|
||||
<data name="makerSupportLinkLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 0, 3, 3</value>
|
||||
</data>
|
||||
<data name="makerSupportLinkLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>74, 14</value>
|
||||
</data>
|
||||
<data name="makerSupportLinkLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="makerSupportLinkLabel.Text" xml:space="preserve">
|
||||
<value>MakerSupport</value>
|
||||
</data>
|
||||
<data name=">>makerSupportLinkLabel.Name" xml:space="preserve">
|
||||
<value>makerSupportLinkLabel</value>
|
||||
</data>
|
||||
<data name=">>makerSupportLinkLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>makerSupportLinkLabel.Parent" xml:space="preserve">
|
||||
<value>flowLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>makerSupportLinkLabel.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="flowLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
|
@ -800,9 +800,6 @@ namespace DS4Windows
|
||||
Removal?.Invoke(this, EventArgs.Empty);
|
||||
}), null);
|
||||
|
||||
//System.Threading.Tasks.Task.Factory.StartNew(() => { Removal?.Invoke(this, EventArgs.Empty); });
|
||||
//Removal?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
timeoutExecuted = true;
|
||||
return;
|
||||
}
|
||||
@ -833,9 +830,6 @@ namespace DS4Windows
|
||||
Removal?.Invoke(this, EventArgs.Empty);
|
||||
}), null);
|
||||
|
||||
//System.Threading.Tasks.Task.Factory.StartNew(() => { Removal?.Invoke(this, EventArgs.Empty); });
|
||||
//Removal?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
timeoutExecuted = true;
|
||||
return;
|
||||
}
|
||||
|
@ -31,12 +31,16 @@ namespace DS4Windows
|
||||
internal const int SONY_VID = 0x054C;
|
||||
internal const int RAZER_VID = 0x1532;
|
||||
internal const int NACON_VID = 0x146B;
|
||||
internal const int HORI_VID = 0x0F0D;
|
||||
|
||||
private static VidPidInfo[] knownDevices =
|
||||
{
|
||||
new VidPidInfo(SONY_VID, 0xBA0), new VidPidInfo(SONY_VID, 0x5C4),
|
||||
new VidPidInfo(SONY_VID, 0x09CC), new VidPidInfo(RAZER_VID, 0x1000),
|
||||
new VidPidInfo(NACON_VID, 0x0D01)
|
||||
new VidPidInfo(SONY_VID, 0xBA0),
|
||||
new VidPidInfo(SONY_VID, 0x5C4),
|
||||
new VidPidInfo(SONY_VID, 0x09CC),
|
||||
new VidPidInfo(RAZER_VID, 0x1000),
|
||||
new VidPidInfo(NACON_VID, 0x0D01),
|
||||
new VidPidInfo(HORI_VID, 0x00EE) // Hori PS4 Mini Wired Gamepad
|
||||
};
|
||||
|
||||
private static string devicePathToInstanceId(string devicePath)
|
||||
|
@ -33,7 +33,7 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.4.118")]
|
||||
[assembly: AssemblyFileVersion("1.4.118")]
|
||||
[assembly: AssemblyVersion("1.4.119")]
|
||||
[assembly: AssemblyFileVersion("1.4.119")]
|
||||
[assembly: NeutralResourcesLanguage("en")]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user