diff --git a/DS4Windows/DS4Control/ControlSerivce.cs b/DS4Windows/DS4Control/ControlSerivce.cs index 7715a3a..0e98081 100644 --- a/DS4Windows/DS4Control/ControlSerivce.cs +++ b/DS4Windows/DS4Control/ControlSerivce.cs @@ -214,13 +214,13 @@ namespace DS4Windows continue; if (((Func)delegate { - for (Int32 Index = 0; Index < DS4Controllers.Length; Index++) + for (Int32 Index = 0, arlength = DS4Controllers.Length; Index < arlength; Index++) if (DS4Controllers[Index] != null && DS4Controllers[Index].MacAddress == device.MacAddress) return true; return false; })()) continue; - for (Int32 Index = 0; Index < DS4Controllers.Length; Index++) + for (Int32 Index = 0, arlength = DS4Controllers.Length; Index < arlength; Index++) if (DS4Controllers[Index] == null) { LogDebug(Properties.Resources.FoundController + device.MacAddress + " (" + device.ConnectionType + ")"); @@ -418,7 +418,7 @@ namespace DS4Windows { DS4Device device = (DS4Device)sender; int ind = -1; - for (int i = 0; i < DS4Controllers.Length; i++) + for (int i = 0, arlength = DS4Controllers.Length; ind == -1 && i < arlength; i++) if (DS4Controllers[i] != null && device.MacAddress == DS4Controllers[i].MacAddress) ind = i; if (ind != -1) @@ -434,10 +434,13 @@ namespace DS4Windows System.Threading.Thread.Sleep(XINPUT_UNPLUG_SETTLE_TIME); DS4Controllers[ind] = null; touchPad[ind] = null; + lag[ind] = false; + inWarnMonitor[ind] = false; ControllerStatusChanged(this); } } public bool[] lag = { false, false, false, false }; + public bool[] inWarnMonitor = { false, false, false, false }; //Called every time the new input report has arrived protected virtual void On_Report(object sender, EventArgs e) { @@ -456,14 +459,23 @@ namespace DS4Windows { LogDebug(device.error); } - if (DateTime.UtcNow - device.firstActive > TimeSpan.FromSeconds(5)) + + if (inWarnMonitor[ind]) { int flashWhenLateAt = getFlashWhenLateAt(); - if (device.Latency >= flashWhenLateAt && !lag[ind]) + if (!lag[ind] && device.Latency >= flashWhenLateAt) LagFlashWarning(ind, true); - else if (device.Latency < flashWhenLateAt && lag[ind]) + else if (lag[ind] && device.Latency < flashWhenLateAt) LagFlashWarning(ind, false); } + else + { + if (DateTime.UtcNow - device.firstActive > TimeSpan.FromSeconds(5)) + { + inWarnMonitor[ind] = true; + } + } + device.getExposedState(ExposedState[ind], CurrentState[ind]); DS4State cState = CurrentState[ind]; device.getPreviousState(PreviousState[ind]); diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 641bacd..c5a2a40 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1718,7 +1718,7 @@ namespace DS4Windows keydown[i] = false; } } - for (ushort i = 0; i < keydown.Length; i++) + for (int i = 0, arlength = keydown.Length; i < arlength; i++) { if (keydown[i]) if (i == 256) InputMethods.MouseEvent(InputMethods.MOUSEEVENTF_LEFTUP); //anything above 255 is not a keyvalue @@ -1752,9 +1752,9 @@ namespace DS4Windows else if (i == 284) macroControl[23] = false; else if (i == 285) macroControl[24] = false; else if (keyType.HasFlag(DS4KeyType.ScanCode)) - InputMethods.performSCKeyRelease(i); + InputMethods.performSCKeyRelease((ushort)i); else - InputMethods.performKeyRelease(i); + InputMethods.performKeyRelease((ushort)i); } DS4LightBar.forcedFlash[device] = 0; DS4LightBar.forcelight[device] = false; diff --git a/DS4Windows/DS4Forms/Hotkeys.Designer.cs b/DS4Windows/DS4Forms/Hotkeys.Designer.cs index d910a0f..5643942 100644 --- a/DS4Windows/DS4Forms/Hotkeys.Designer.cs +++ b/DS4Windows/DS4Forms/Hotkeys.Designer.cs @@ -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.linkTeokp = new System.Windows.Forms.LinkLabel(); this.linkKiliansch = new System.Windows.Forms.LinkLabel(); this.linkChamilsaan = new System.Windows.Forms.LinkLabel(); this.linkBoganhobo = new System.Windows.Forms.LinkLabel(); @@ -85,7 +86,6 @@ this.lbTranslators = new System.Windows.Forms.Label(); this.linkSourceCode = new System.Windows.Forms.LinkLabel(); this.lbLinkText = new System.Windows.Forms.Label(); - this.linkTeokp = new System.Windows.Forms.LinkLabel(); this.tCAbout.SuspendLayout(); this.tPHotkeys.SuspendLayout(); this.tPCredits.SuspendLayout(); @@ -177,6 +177,13 @@ this.tPCredits.Name = "tPCredits"; this.tPCredits.UseVisualStyleBackColor = true; // + // linkTeokp + // + resources.ApplyResources(this.linkTeokp, "linkTeokp"); + this.linkTeokp.Name = "linkTeokp"; + this.linkTeokp.TabStop = true; + this.linkTeokp.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkTeokp_LinkClicked); + // // linkKiliansch // resources.ApplyResources(this.linkKiliansch, "linkKiliansch"); @@ -448,13 +455,6 @@ resources.ApplyResources(this.lbLinkText, "lbLinkText"); this.lbLinkText.Name = "lbLinkText"; // - // linkTeokp - // - resources.ApplyResources(this.linkTeokp, "linkTeokp"); - this.linkTeokp.Name = "linkTeokp"; - this.linkTeokp.TabStop = true; - this.linkTeokp.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkTeokp_LinkClicked); - // // Hotkeys // resources.ApplyResources(this, "$this"); diff --git a/DS4Windows/DS4Forms/Hotkeys.cs b/DS4Windows/DS4Forms/Hotkeys.cs index 0fbffb3..62b9961 100644 --- a/DS4Windows/DS4Forms/Hotkeys.cs +++ b/DS4Windows/DS4Forms/Hotkeys.cs @@ -77,7 +77,7 @@ namespace DS4Windows private void lLChangelog_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - Process.Start("https://docs.google.com/document/d/1l4xcgVQkGUskc5CQ0p069yW22Cd5WAH_yE3Fz2hXo0E/edit?usp=sharing"); + Process.Start("https://docs.google.com/document/d/1CovpH08fbPSXrC6TmEprzgPwCe0tTjQ_HTFfDotpmxk/edit?usp=sharing"); } private void linkDonate_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) diff --git a/DS4Windows/DS4Forms/Hotkeys.resx b/DS4Windows/DS4Forms/Hotkeys.resx index fae6e6f..d37f105 100644 --- a/DS4Windows/DS4Forms/Hotkeys.resx +++ b/DS4Windows/DS4Forms/Hotkeys.resx @@ -123,14 +123,10 @@ - 8, 58 - - - - 4, 0, 4, 0 + 6, 47 - 201, 17 + 149, 13 18 @@ -154,13 +150,10 @@ True - 8, 4 - - - 4, 0, 4, 0 + 6, 3 - 80, 17 + 60, 13 18 @@ -180,6 +173,7 @@ 9 + Top @@ -189,11 +183,8 @@ 0, 0 - - 4, 0, 4, 0 - - 756, 44 + 567, 36 0 @@ -220,13 +211,10 @@ True - 8, 31 - - - 4, 0, 4, 0 + 6, 25 - 210, 17 + 159, 13 18 @@ -250,13 +238,10 @@ True - 8, 85 - - - 4, 0, 4, 0 + 6, 69 - 115, 17 + 87, 13 18 @@ -280,13 +265,10 @@ True - 5, 18 - - - 4, 0, 4, 0 + 4, 15 - 76, 17 + 58, 13 20 @@ -310,13 +292,10 @@ Top, Right - 513, 18 - - - 4, 0, 4, 0 + 385, 15 - 231, 17 + 173, 14 21 @@ -342,6 +321,801 @@ True + + lbHotkeys + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPHotkeys + + + 0 + + + 4, 22 + + + 3, 3, 3, 3 + + + 559, 447 + + + 0 + + + Hotkeys + + + tPHotkeys + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCAbout + + + 0 + + + True + + + NoControl + + + 208, 93 + + + 34, 13 + + + 23 + + + teokp + + + linkTeokp + + + System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCredits + + + 0 + + + True + + + NoControl + + + 154, 93 + + + 48, 13 + + + 22 + + + kiliansch + + + linkKiliansch + + + System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCredits + + + 1 + + + True + + + NoControl + + + 80, 93 + + + 61, 13 + + + 21 + + + Chamilsaan + + + linkChamilsaan + + + System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCredits + + + 2 + + + True + + + NoControl + + + 7, 93 + + + 61, 13 + + + 20 + + + boganhobo + + + linkBoganhobo + + + System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCredits + + + 3 + + + 2 + + + lbuk + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 0 + + + lbUkrainianT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 1 + + + lbid + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 2 + + + lbIndonesianT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 3 + + + lbhu + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 4 + + + lbHungarianT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 5 + + + lbel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 6 + + + lbGreekT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 7 + + + lbfi + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 8 + + + lbFinnishT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 9 + + + lbcs + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 10 + + + lbCzechT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 11 + + + lbpt + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 12 + + + lbPortugueseT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 13 + + + lbes + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 14 + + + lbSpanishT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 15 + + + lbpl + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 16 + + + lbPolishT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 17 + + + lbde + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 18 + + + lbGermanT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 19 + + + lbItalianT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 20 + + + lbitIT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 21 + + + lbruRU + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 22 + + + lbRussianT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 23 + + + lbroRO + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 24 + + + lbRomanianT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 25 + + + lbtr + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 26 + + + lbTurkishT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 27 + + + lbzhHans + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 28 + + + lbChineseST + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 29 + + + lbzhHant + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 30 + + + lbChineseTT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 31 + + + lbar + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 32 + + + lbArabicT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 33 + + + lbhe + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 34 + + + lbHebrewT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 35 + + + lbfrFR + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 36 + + + lbFrenchT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tLPTranslators + + + 37 + + + Bottom + + + 3, 130 + + + 19 + + + 553, 301 + + + 19 + + + tLPTranslators + + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCredits + + + 4 + + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="lbuk" Row="18" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbUkrainianT" Row="18" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbid" Row="17" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbIndonesianT" Row="17" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbhu" Row="16" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbHungarianT" Row="16" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbel" Row="15" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbGreekT" Row="15" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbfi" Row="14" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbFinnishT" Row="14" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbcs" Row="13" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbCzechT" Row="13" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbpt" Row="12" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbPortugueseT" Row="12" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbes" Row="11" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbSpanishT" Row="11" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbpl" Row="10" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbPolishT" Row="10" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbde" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbGermanT" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbItalianT" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbitIT" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbruRU" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbRussianT" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbroRO" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbRomanianT" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbtr" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbTurkishT" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbzhHans" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbChineseST" Row="5" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbzhHant" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbChineseTT" Row="6" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbar" Row="7" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbArabicT" Row="7" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbhe" Row="8" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbHebrewT" Row="8" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbfrFR" Row="9" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbFrenchT" Row="9" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,AutoSize,0" /><Rows Styles="Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Absolute,16,Absolute,16,Absolute,16,Absolute,16,Absolute,16,Absolute,16,Absolute,16" /></TableLayoutSettings> + + + Bottom, Left + + + True + + + NoControl + + + 4, 114 + + + 59, 13 + + + 13 + + + Translators + + + lbTranslators + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCredits + + + 5 + + + True + + + NoControl + + + 72, 3 + + + 69, 13 + + + 18 + + + Source Code + + + linkSourceCode + + + System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCredits + + + 7 + + + True + + + Bottom + + + NoControl + + + 3, 431 + + + 103, 13 + + + 13 + + + Links displayed here + + + lbLinkText + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCredits + + + 8 + + + 4, 22 + + + 3, 3, 3, 3 + + + 559, 447 + + + 1 + + + Credits + + + tPCredits + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCAbout + + + 1 + + + Fill + + + 0, 36 + + + 567, 473 + + + 22 + + + tCAbout + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + Top @@ -349,13 +1123,10 @@ NoControl - 4, 4 - - - 4, 0, 4, 0 + 3, 3 - 719, 559 + 536, 454 3 @@ -391,171 +1162,6 @@ Scan Code: Keys are interpreted differently. May be needed for certain games 0 - - 4, 25 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 - - - 748, 553 - - - 0 - - - Hotkeys - - - tPHotkeys - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCAbout - - - 0 - - - True - - - NoControl - - - 278, 114 - - - 4, 0, 4, 0 - - - 43, 17 - - - 23 - - - teokp - - - linkTeokp - - - System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCredits - - - 0 - - - True - - - NoControl - - - 205, 114 - - - 4, 0, 4, 0 - - - 62, 17 - - - 22 - - - kiliansch - - - linkKiliansch - - - System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCredits - - - 1 - - - True - - - NoControl - - - 106, 114 - - - 4, 0, 4, 0 - - - 81, 17 - - - 21 - - - Chamilsaan - - - linkChamilsaan - - - System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCredits - - - 2 - - - True - - - NoControl - - - 9, 114 - - - 4, 0, 4, 0 - - - 80, 17 - - - 20 - - - boganhobo - - - linkBoganhobo - - - System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCredits - - - 3 - - - 2 - True @@ -563,10 +1169,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 3, 348 + 2, 276 + + + 2, 0, 2, 0 - 68, 17 + 52, 13 43 @@ -593,10 +1202,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 189, 348 + 147, 276 + + + 2, 0, 2, 0 - 78, 17 + 61, 13 42 @@ -623,10 +1235,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 3, 328 + 2, 260 + + + 2, 0, 2, 0 - 77, 17 + 59, 13 41 @@ -653,10 +1268,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 189, 328 + 147, 260 + + + 2, 0, 2, 0 - 95, 17 + 72, 13 40 @@ -683,10 +1301,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 3, 308 + 2, 244 + + + 2, 0, 2, 0 - 74, 17 + 56, 13 39 @@ -713,10 +1334,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 189, 308 + 147, 244 + + + 2, 0, 2, 0 - 165, 17 + 123, 13 38 @@ -743,10 +1367,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 3, 288 + 2, 228 + + + 2, 0, 2, 0 - 107, 17 + 84, 13 37 @@ -773,10 +1400,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 189, 288 + 147, 228 + + + 2, 0, 2, 0 - 415, 17 + 309, 13 36 @@ -803,10 +1433,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 3, 268 + 2, 212 + + + 2, 0, 2, 0 - 53, 17 + 40, 13 35 @@ -833,10 +1466,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 189, 268 + 147, 212 + + + 2, 0, 2, 0 - 23, 17 + 18, 13 34 @@ -863,10 +1499,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 3, 248 + 2, 196 + + + 2, 0, 2, 0 - 47, 17 + 37, 13 33 @@ -893,10 +1532,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 189, 248 + 147, 196 + + + 2, 0, 2, 0 - 147, 17 + 112, 13 32 @@ -923,10 +1565,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 3, 228 + 2, 180 + + + 2, 0, 2, 0 - 81, 17 + 61, 13 31 @@ -953,10 +1598,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 189, 228 + 147, 180 + + + 2, 0, 2, 0 - 56, 17 + 44, 13 30 @@ -980,10 +1628,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games True - 3, 209 + 2, 165 + + + 2, 0, 2, 0 - 114, 17 + 88, 13 0 @@ -1007,10 +1658,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games True - 189, 209 + 147, 165 + + + 2, 0, 2, 0 - 56, 17 + 43, 13 1 @@ -1034,10 +1688,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games True - 3, 190 + 2, 150 + + + 2, 0, 2, 0 - 86, 17 + 67, 13 2 @@ -1061,10 +1718,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games True - 189, 190 + 147, 150 + + + 2, 0, 2, 0 - 188, 17 + 145, 13 3 @@ -1091,13 +1751,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 4, 0 - - - 4, 0, 4, 0 + 3, 0 - 115, 17 + 89, 13 13 @@ -1127,13 +1784,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 190, 0 - - - 4, 0, 4, 0 + 148, 0 - 546, 19 + 402, 15 13 @@ -1163,13 +1817,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 190, 19 - - - 4, 0, 4, 0 + 148, 15 - 546, 19 + 402, 15 13 @@ -1196,13 +1847,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 4, 19 - - - 4, 0, 4, 0 + 3, 15 - 94, 17 + 74, 13 13 @@ -1229,13 +1877,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 4, 38 - - - 4, 0, 4, 0 + 3, 30 - 151, 17 + 120, 13 13 @@ -1265,13 +1910,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 190, 38 - - - 4, 0, 4, 0 + 148, 30 - 546, 19 + 402, 15 13 @@ -1298,13 +1940,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 4, 57 - - - 4, 0, 4, 0 + 3, 45 - 124, 17 + 95, 13 16 @@ -1334,13 +1973,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 190, 57 - - - 4, 0, 4, 0 + 148, 45 - 546, 19 + 402, 15 17 @@ -1367,13 +2003,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 4, 76 - - - 4, 0, 4, 0 + 3, 60 - 103, 17 + 81, 13 18 @@ -1403,13 +2036,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 190, 76 - - - 4, 0, 4, 0 + 148, 60 - 546, 19 + 402, 15 19 @@ -1436,13 +2066,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 4, 95 - - - 4, 0, 4, 0 + 3, 75 - 178, 17 + 139, 13 21 @@ -1469,13 +2096,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 190, 95 - - - 4, 0, 4, 0 + 148, 75 - 118, 17 + 89, 13 20 @@ -1502,13 +2126,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 4, 114 - - - 4, 0, 4, 0 + 3, 90 - 177, 17 + 138, 13 23 @@ -1535,13 +2156,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 190, 114 - - - 4, 0, 4, 0 + 148, 90 - 114, 17 + 86, 13 22 @@ -1568,13 +2186,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 4, 133 - - - 4, 0, 4, 0 + 3, 105 - 85, 17 + 75, 13 25 @@ -1601,13 +2216,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 190, 133 - - - 4, 0, 4, 0 + 148, 105 - 93, 17 + 72, 13 24 @@ -1634,13 +2246,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 4, 152 - - - 4, 0, 4, 0 + 3, 120 - 95, 17 + 81, 13 27 @@ -1667,13 +2276,10 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 190, 152 - - - 4, 0, 4, 0 + 148, 120 - 42, 17 + 33, 13 26 @@ -1697,10 +2303,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games True - 3, 171 + 2, 135 + + + 2, 0, 2, 0 - 110, 17 + 85, 13 28 @@ -1727,10 +2336,13 @@ Scan Code: Keys are interpreted differently. May be needed for certain games NoControl - 189, 171 + 147, 135 + + + 2, 0, 2, 0 - 163, 17 + 122, 13 29 @@ -1750,215 +2362,17 @@ Scan Code: Keys are interpreted differently. May be needed for certain games 37 - - Bottom - - - 4, 161 - - - 4, 4, 4, 4 - - - 19 - - - 740, 371 - - - 19 - - - tLPTranslators - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCredits - - - 4 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="lbuk" Row="18" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbUkrainianT" Row="18" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbid" Row="17" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbIndonesianT" Row="17" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbhu" Row="16" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbHungarianT" Row="16" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbel" Row="15" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbGreekT" Row="15" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbfi" Row="14" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbFinnishT" Row="14" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbcs" Row="13" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbCzechT" Row="13" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbpt" Row="12" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbPortugueseT" Row="12" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbes" Row="11" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbSpanishT" Row="11" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbpl" Row="10" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbPolishT" Row="10" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbde" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbGermanT" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbItalianT" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbitIT" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbruRU" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbRussianT" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbroRO" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbRomanianT" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbtr" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbTurkishT" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbzhHans" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbChineseST" Row="5" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbzhHant" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbChineseTT" Row="6" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbar" Row="7" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbArabicT" Row="7" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbhe" Row="8" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbHebrewT" Row="8" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbfrFR" Row="9" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbFrenchT" Row="9" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,AutoSize,0" /><Rows Styles="Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Absolute,20,Absolute,20,Absolute,20,Absolute,20,Absolute,20,Absolute,20,Absolute,20" /></TableLayoutSettings> - - - Bottom, Left - - - True - - - NoControl - - - 5, 140 - - - 4, 0, 4, 0 - - - 80, 17 - - - 13 - - - Translators - - - lbTranslators - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCredits - - - 5 - - - True - - - NoControl - - - 96, 4 - - - 4, 0, 4, 0 - - - 90, 17 - - - 18 - - - Source Code - - - linkSourceCode - - - System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCredits - - - 7 - - - True - - - Bottom - - - NoControl - - - 4, 532 - - - 4, 0, 4, 0 - - - 138, 17 - - - 13 - - - Links displayed here - - - lbLinkText - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCredits - - - 8 - - - 4, 25 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 - - - 748, 553 - - - 1 - - - Credits - - - tPCredits - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCAbout - - - 1 - - - Fill - - - 0, 44 - - - 4, 4, 4, 4 - - - 756, 582 - - - 22 - - - tCAbout - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - True - 8, 16 + 6, 13 - 756, 626 - - - 4, 4, 4, 4 + 567, 509 - 670, 516 + 506, 427 CenterParent diff --git a/DS4Windows/DS4Library/DS4Devices.cs b/DS4Windows/DS4Library/DS4Devices.cs index 5e7be1b..ef316f8 100644 --- a/DS4Windows/DS4Library/DS4Devices.cs +++ b/DS4Windows/DS4Library/DS4Devices.cs @@ -188,6 +188,9 @@ namespace DS4Windows { throw new Exception("Error disabling device, error code = " + Marshal.GetLastWin32Error()); } + + System.Threading.Thread.Sleep(50); + propChangeParams.stateChange = NativeMethods.DICS_ENABLE; success = NativeMethods.SetupDiSetClassInstallParams(deviceInfoSet, ref deviceInfoData, ref propChangeParams, Marshal.SizeOf(propChangeParams)); if (!success)