Version 1.4.0.7

Improved mapping support: can better handle the switching of controls:
ie triangle and circle/dpad and left stick/L1+R1 and L2+R2. If you have
a profile with swap buttons, they may not work until you open the
profile in settings and resave.
Servers moved to ds4winsdows.com
Remove DS4Windows from Alt+tab menu if minimized to tray (thanks
youturnjason)
Basic support for command line arguments (right now just "-stop" is
supported: starts program up without starting the ds4)
This commit is contained in:
jays2kings 2014-10-13 17:56:04 -04:00
parent 9b65de10ad
commit 0f4297bd9e
8 changed files with 206 additions and 187 deletions

View File

@ -666,7 +666,7 @@ namespace DS4Control
Global.getShiftCustomButton(device, customButton.Key) == X360Controls.None))
{
if (customButton.Key == DS4Controls.Square)
Console.WriteLine("hello");
Console.WriteLine("hello");
DS4KeyType keyType = Global.getCustomKeyType(device, customButton.Key);
int keyvalue = 0;
switch (customButton.Value)
@ -702,68 +702,73 @@ namespace DS4Control
//once++;
resetToDefaultValue(customButton.Key, MappedState); // erase default mappings for things that are remapped
if (customButton.Key == DS4Controls.L2 || customButton.Key == DS4Controls.R2 ||
customButton.Key == DS4Controls.LXNeg || customButton.Key == DS4Controls.LXPos ||
customButton.Key == DS4Controls.LYNeg || customButton.Key == DS4Controls.LYPos ||
customButton.Key == DS4Controls.RXNeg || customButton.Key == DS4Controls.RXPos ||
customButton.Key == DS4Controls.RYNeg || customButton.Key == DS4Controls.RYPos)
resetToDefaultValue(customButton.Key, MappedState); // erase default mappings for things that are remapped
switch (customButton.Value)
{
case X360Controls.A:
if (!MappedState.Cross)
MappedState.Cross = getBoolMapping(customButton.Key, cState, eState);
//if (!MappedState.Cross)
MappedState.Cross = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.B:
if (!MappedState.Circle)
MappedState.Circle = getBoolMapping(customButton.Key, cState, eState);
//if (!MappedState.Circle)
MappedState.Circle = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.X:
if (!MappedState.Square)
MappedState.Square = getBoolMapping(customButton.Key, cState, eState);
//if (!MappedState.Square)
MappedState.Square = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.Y:
if (!MappedState.Triangle)
MappedState.Triangle = getBoolMapping(customButton.Key, cState, eState);
//if (!MappedState.Triangle)
MappedState.Triangle = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.LB:
if (!MappedState.L1)
MappedState.L1 = getBoolMapping(customButton.Key, cState, eState);
//if (!MappedState.L1)
MappedState.L1 = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.LS:
if (!MappedState.L3)
MappedState.L3 = getBoolMapping(customButton.Key, cState, eState);
//if (!MappedState.L3)
MappedState.L3 = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.RB:
if (!MappedState.R1)
MappedState.R1 = getBoolMapping(customButton.Key, cState, eState);
//if (!MappedState.R1)
MappedState.R1 = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.RS:
if (!MappedState.R3)
MappedState.R3 = getBoolMapping(customButton.Key, cState, eState);
//if (!MappedState.R3)
MappedState.R3 = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.DpadUp:
if (!MappedState.DpadUp)
MappedState.DpadUp = getBoolMapping(customButton.Key, cState, eState);
//if (!MappedState.DpadUp)
MappedState.DpadUp = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.DpadDown:
if (!MappedState.DpadDown)
MappedState.DpadDown = getBoolMapping(customButton.Key, cState, eState);
//if (!MappedState.DpadDown)
MappedState.DpadDown = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.DpadLeft:
if (!MappedState.DpadLeft)
MappedState.DpadLeft = getBoolMapping(customButton.Key, cState, eState);
//if (!MappedState.DpadLeft)
MappedState.DpadLeft = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.DpadRight:
if (!MappedState.DpadRight)
MappedState.DpadRight = getBoolMapping(customButton.Key, cState, eState);
//if (!MappedState.DpadRight)
MappedState.DpadRight = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.Guide:
if (!MappedState.PS)
MappedState.PS = getBoolMapping(customButton.Key, cState, eState);
//if (!MappedState.PS)
MappedState.PS = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.Back:
if (!MappedState.Share)
MappedState.Share = getBoolMapping(customButton.Key, cState, eState);
//if (!MappedState.Share)
MappedState.Share = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.Start:
if (!MappedState.Options)
MappedState.Options = getBoolMapping(customButton.Key, cState, eState);
//if (!MappedState.Options)
MappedState.Options = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.LXNeg:
if (LXChanged)
@ -864,8 +869,7 @@ namespace DS4Control
}
}
}
//if (!LX)
if (Math.Abs(127 - MappedState.LX) <= 5)// || (Math.Abs(127 - cState.LX) > 5))
if (Math.Abs(127 - MappedState.LX) <= 5)
MappedState.LX = cState.LX;
if (Math.Abs(127 - MappedState.LY) <= 5)
MappedState.LY = cState.LY;
@ -1025,8 +1029,6 @@ namespace DS4Control
// resetToDefaultValue(customButton.Key, MappedState); // erase default mappings for things that are remapped
foreach (KeyValuePair<DS4Controls, X360Controls> customButton in customButtons)
{
if (customButton.Key == DS4Controls.Square)
Console.WriteLine("Hi");
DS4KeyType keyType = Global.getShiftCustomKeyType(device, customButton.Key);
int keyvalue = 0;
switch (customButton.Value)
@ -1061,108 +1063,112 @@ namespace DS4Control
bool RYChanged = Math.Abs(127 - MappedState.RY) <= 5;
//once++;
resetToDefaultValue(customButton.Key, MappedState); // erase default mappings for things that are remapped
if (customButton.Key == DS4Controls.L2 || customButton.Key == DS4Controls.R2 ||
customButton.Key == DS4Controls.LXNeg || customButton.Key == DS4Controls.LXPos ||
customButton.Key == DS4Controls.LYNeg || customButton.Key == DS4Controls.LYPos ||
customButton.Key == DS4Controls.RXNeg || customButton.Key == DS4Controls.RXPos ||
customButton.Key == DS4Controls.RYNeg || customButton.Key == DS4Controls.RYPos)
resetToDefaultValue(customButton.Key, MappedState); // erase default mappings for things that are remapped
switch (customButton.Value)
{
case X360Controls.A:
if (!MappedState.Cross)
//if (!MappedState.Cross)
MappedState.Cross = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.B:
if (!MappedState.Circle)
//if (!MappedState.Circle)
MappedState.Circle = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.X:
if (!MappedState.Square)
//if (!MappedState.Square)
MappedState.Square = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.Y:
if (!MappedState.Triangle)
//if (!MappedState.Triangle)
MappedState.Triangle = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.LB:
if (!MappedState.L1)
//if (!MappedState.L1)
MappedState.L1 = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.LS:
if (!MappedState.L3)
//if (!MappedState.L3)
MappedState.L3 = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.RB:
if (!MappedState.R1)
//if (!MappedState.R1)
MappedState.R1 = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.RS:
if (!MappedState.R3)
//if (!MappedState.R3)
MappedState.R3 = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.DpadUp:
if (!MappedState.DpadUp)
//if (!MappedState.DpadUp)
MappedState.DpadUp = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.DpadDown:
if (!MappedState.DpadDown)
//if (!MappedState.DpadDown)
MappedState.DpadDown = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.DpadLeft:
if (!MappedState.DpadLeft)
//if (!MappedState.DpadLeft)
MappedState.DpadLeft = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.DpadRight:
if (!MappedState.DpadRight)
//if (!MappedState.DpadRight)
MappedState.DpadRight = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.Guide:
if (!MappedState.PS)
//if (!MappedState.PS)
MappedState.PS = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.Back:
if (!MappedState.Share)
//if (!MappedState.Share)
MappedState.Share = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.Start:
if (!MappedState.Options)
//if (!MappedState.Options)
MappedState.Options = getBoolMapping(customButton.Key, cState, eState);
break;
case X360Controls.LXNeg:
if (LXChanged)
//if (LXChanged)
MappedState.LX = getXYAxisMapping(device, customButton.Key, cState, eState);
break;
case X360Controls.LYNeg:
if (LYChanged)
//if (LYChanged)
MappedState.LY = getXYAxisMapping(device, customButton.Key, cState, eState);
break;
case X360Controls.RXNeg:
if (RXChanged)
//if (RXChanged)
MappedState.RX = getXYAxisMapping(device, customButton.Key, cState, eState);
break;
case X360Controls.RYNeg:
if (RYChanged)
//if (RYChanged)
MappedState.RY = getXYAxisMapping(device, customButton.Key, cState, eState);
break;
case X360Controls.LXPos:
if (LXChanged)
//if (LXChanged)
MappedState.LX = getXYAxisMapping(device, customButton.Key, cState, eState, true);
break;
case X360Controls.LYPos:
if (LYChanged)
//if (LYChanged)
MappedState.LY = getXYAxisMapping(device, customButton.Key, cState, eState, true);
break;
case X360Controls.RXPos:
if (RXChanged)
//if (RXChanged)
MappedState.RX = getXYAxisMapping(device, customButton.Key, cState, eState, true);
break;
case X360Controls.RYPos:
if (RYChanged)
//if (RYChanged)
MappedState.RY = getXYAxisMapping(device, customButton.Key, cState, eState, true);
break;
case X360Controls.LT:
if (MappedState.L2 == 0)
//if (MappedState.L2 == 0)
MappedState.L2 = getByteMapping(device, customButton.Key, cState, eState);
break;
case X360Controls.RT:
if (MappedState.R2 == 0)
//if (MappedState.R2 == 0)
MappedState.R2 = getByteMapping(device, customButton.Key, cState, eState);
break;
case X360Controls.LeftMouse:

View File

@ -29,6 +29,8 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Options));
this.bnL2 = new System.Windows.Forms.Button();
this.bnR2 = new System.Windows.Forms.Button();
this.bnTouchUpper = new System.Windows.Forms.Button();
this.bnTouchMulti = new System.Windows.Forms.Button();
this.bnTouchRight = new System.Windows.Forms.Button();
@ -45,9 +47,7 @@
this.bnUp = new System.Windows.Forms.Button();
this.btnLeftStick = new System.Windows.Forms.Button();
this.bnDown = new System.Windows.Forms.Button();
this.bnL2 = new System.Windows.Forms.Button();
this.bnRight = new System.Windows.Forms.Button();
this.bnR2 = new System.Windows.Forms.Button();
this.bnLeft = new System.Windows.Forms.Button();
this.bnL1 = new System.Windows.Forms.Button();
this.bnOptions = new System.Windows.Forms.Button();
@ -300,6 +300,34 @@
((System.ComponentModel.ISupportInitialize)(this.tBL2)).BeginInit();
this.SuspendLayout();
//
// bnL2
//
this.bnL2.BackColor = System.Drawing.Color.Transparent;
resources.ApplyResources(this.bnL2, "bnL2");
this.bnL2.Cursor = System.Windows.Forms.Cursors.Default;
this.bnL2.FlatAppearance.BorderColor = System.Drawing.Color.Red;
this.bnL2.FlatAppearance.BorderSize = 0;
this.bnL2.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control;
this.bnL2.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.Control;
this.bnL2.ForeColor = System.Drawing.SystemColors.WindowText;
this.bnL2.Name = "bnL2";
this.bnL2.UseVisualStyleBackColor = false;
this.bnL2.Click += new System.EventHandler(this.Show_ControlsBn);
//
// bnR2
//
this.bnR2.BackColor = System.Drawing.Color.Transparent;
resources.ApplyResources(this.bnR2, "bnR2");
this.bnR2.Cursor = System.Windows.Forms.Cursors.Default;
this.bnR2.FlatAppearance.BorderColor = System.Drawing.Color.Red;
this.bnR2.FlatAppearance.BorderSize = 0;
this.bnR2.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control;
this.bnR2.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.Control;
this.bnR2.ForeColor = System.Drawing.SystemColors.WindowText;
this.bnR2.Name = "bnR2";
this.bnR2.UseVisualStyleBackColor = false;
this.bnR2.Click += new System.EventHandler(this.Show_ControlsBn);
//
// bnTouchUpper
//
this.bnTouchUpper.BackColor = System.Drawing.Color.Transparent;
@ -381,14 +409,14 @@
this.MainPanel.Controls.Add(this.bnUp);
this.MainPanel.Controls.Add(this.btnLeftStick);
this.MainPanel.Controls.Add(this.bnDown);
this.MainPanel.Controls.Add(this.bnL2);
this.MainPanel.Controls.Add(this.bnRight);
this.MainPanel.Controls.Add(this.bnR2);
this.MainPanel.Controls.Add(this.bnLeft);
this.MainPanel.Controls.Add(this.bnL1);
this.MainPanel.Controls.Add(this.bnOptions);
this.MainPanel.Controls.Add(this.bnPS);
this.MainPanel.Controls.Add(this.bnShare);
this.MainPanel.Controls.Add(this.bnL2);
this.MainPanel.Controls.Add(this.bnR2);
resources.ApplyResources(this.MainPanel, "MainPanel");
this.MainPanel.Name = "MainPanel";
//
@ -540,20 +568,6 @@
this.bnDown.UseVisualStyleBackColor = false;
this.bnDown.Click += new System.EventHandler(this.Show_ControlsBn);
//
// bnL2
//
this.bnL2.BackColor = System.Drawing.Color.Transparent;
resources.ApplyResources(this.bnL2, "bnL2");
this.bnL2.Cursor = System.Windows.Forms.Cursors.Default;
this.bnL2.FlatAppearance.BorderColor = System.Drawing.Color.Red;
this.bnL2.FlatAppearance.BorderSize = 0;
this.bnL2.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control;
this.bnL2.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.Control;
this.bnL2.ForeColor = System.Drawing.SystemColors.WindowText;
this.bnL2.Name = "bnL2";
this.bnL2.UseVisualStyleBackColor = false;
this.bnL2.Click += new System.EventHandler(this.Show_ControlsBn);
//
// bnRight
//
this.bnRight.BackColor = System.Drawing.Color.Transparent;
@ -568,20 +582,6 @@
this.bnRight.UseVisualStyleBackColor = false;
this.bnRight.Click += new System.EventHandler(this.Show_ControlsBn);
//
// bnR2
//
this.bnR2.BackColor = System.Drawing.Color.Transparent;
resources.ApplyResources(this.bnR2, "bnR2");
this.bnR2.Cursor = System.Windows.Forms.Cursors.Default;
this.bnR2.FlatAppearance.BorderColor = System.Drawing.Color.Red;
this.bnR2.FlatAppearance.BorderSize = 0;
this.bnR2.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control;
this.bnR2.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.Control;
this.bnR2.ForeColor = System.Drawing.SystemColors.WindowText;
this.bnR2.Name = "bnR2";
this.bnR2.UseVisualStyleBackColor = false;
this.bnR2.Click += new System.EventHandler(this.Show_ControlsBn);
//
// bnLeft
//
this.bnLeft.BackColor = System.Drawing.Color.Transparent;

View File

@ -34,11 +34,11 @@ namespace ScpServer
root = rt;
g = CreateGraphics();
greyscale = GreyscaleImage((Bitmap)pBRainbow.Image);
foreach (System.Windows.Forms.Control control in MainPanel.Controls)
foreach (System.Windows.Forms.Control control in SticksPanel.Controls)
if (control is Button)
if (!((Button)control).Name.Contains("btn"))
buttons.Add((Button)control);
foreach (System.Windows.Forms.Control control in SticksPanel.Controls)
foreach (System.Windows.Forms.Control control in MainPanel.Controls)
if (control is Button)
if (!((Button)control).Name.Contains("btn"))
buttons.Add((Button)control);
@ -58,6 +58,10 @@ namespace ScpServer
if (control is Button)
if (!((Button)control).Name.Contains("sbtn"))
subbuttons.Add((Button)control);
string butts = "";
foreach (Button b in buttons)
butts += "\n" + b.Name;
//MessageBox.Show(butts);
root.lbLastMessage.ForeColor = Color.Black;
root.lbLastMessage.Text = "Hover over items to see description or more about";
foreach (System.Windows.Forms.Control control in Controls)

View File

@ -118,6 +118,74 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="bnL2.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="bnL2.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="bnL2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="bnL2.Location" type="System.Drawing.Point, System.Drawing">
<value>31, 0</value>
</data>
<data name="bnL2.Size" type="System.Drawing.Size, System.Drawing">
<value>43, 12</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="bnL2.TabIndex" type="System.Int32, mscorlib">
<value>90</value>
</data>
<data name="bnL2.Text" xml:space="preserve">
<value>Left Trigger</value>
</data>
<data name="&gt;&gt;bnL2.Name" xml:space="preserve">
<value>bnL2</value>
</data>
<data name="&gt;&gt;bnL2.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;bnL2.Parent" xml:space="preserve">
<value>MainPanel</value>
</data>
<data name="&gt;&gt;bnL2.ZOrder" xml:space="preserve">
<value>21</value>
</data>
<data name="bnR2.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="bnR2.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="bnR2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="bnR2.Location" type="System.Drawing.Point, System.Drawing">
<value>174, 0</value>
</data>
<data name="bnR2.Size" type="System.Drawing.Size, System.Drawing">
<value>40, 13</value>
</data>
<data name="bnR2.TabIndex" type="System.Int32, mscorlib">
<value>89</value>
</data>
<data name="bnR2.Text" xml:space="preserve">
<value>Right Trigger</value>
</data>
<data name="&gt;&gt;bnR2.Name" xml:space="preserve">
<value>bnR2</value>
</data>
<data name="&gt;&gt;bnR2.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;bnR2.Parent" xml:space="preserve">
<value>MainPanel</value>
</data>
<data name="&gt;&gt;bnR2.ZOrder" xml:space="preserve">
<value>22</value>
</data>
<data name="bnTouchUpper.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
@ -127,14 +195,12 @@
<data name="bnTouchUpper.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="bnTouchUpper.Location" type="System.Drawing.Point, System.Drawing">
<value>84, 25</value>
</data>
<data name="bnTouchUpper.Size" type="System.Drawing.Size, System.Drawing">
<value>78, 16</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="bnTouchUpper.TabIndex" type="System.Int32, mscorlib">
<value>193</value>
</data>
@ -615,39 +681,6 @@
<data name="&gt;&gt;bnDown.ZOrder" xml:space="preserve">
<value>14</value>
</data>
<data name="bnL2.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="bnL2.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="bnL2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="bnL2.Location" type="System.Drawing.Point, System.Drawing">
<value>31, 0</value>
</data>
<data name="bnL2.Size" type="System.Drawing.Size, System.Drawing">
<value>43, 12</value>
</data>
<data name="bnL2.TabIndex" type="System.Int32, mscorlib">
<value>90</value>
</data>
<data name="bnL2.Text" xml:space="preserve">
<value>Left Trigger</value>
</data>
<data name="&gt;&gt;bnL2.Name" xml:space="preserve">
<value>bnL2</value>
</data>
<data name="&gt;&gt;bnL2.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;bnL2.Parent" xml:space="preserve">
<value>MainPanel</value>
</data>
<data name="&gt;&gt;bnL2.ZOrder" xml:space="preserve">
<value>15</value>
</data>
<data name="bnRight.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
@ -679,40 +712,7 @@
<value>MainPanel</value>
</data>
<data name="&gt;&gt;bnRight.ZOrder" xml:space="preserve">
<value>16</value>
</data>
<data name="bnR2.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="bnR2.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="bnR2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="bnR2.Location" type="System.Drawing.Point, System.Drawing">
<value>174, 0</value>
</data>
<data name="bnR2.Size" type="System.Drawing.Size, System.Drawing">
<value>40, 13</value>
</data>
<data name="bnR2.TabIndex" type="System.Int32, mscorlib">
<value>89</value>
</data>
<data name="bnR2.Text" xml:space="preserve">
<value>Right Trigger</value>
</data>
<data name="&gt;&gt;bnR2.Name" xml:space="preserve">
<value>bnR2</value>
</data>
<data name="&gt;&gt;bnR2.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;bnR2.Parent" xml:space="preserve">
<value>MainPanel</value>
</data>
<data name="&gt;&gt;bnR2.ZOrder" xml:space="preserve">
<value>17</value>
<value>15</value>
</data>
<data name="bnLeft.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
@ -745,7 +745,7 @@
<value>MainPanel</value>
</data>
<data name="&gt;&gt;bnLeft.ZOrder" xml:space="preserve">
<value>18</value>
<value>16</value>
</data>
<data name="bnL1.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
@ -778,7 +778,7 @@
<value>MainPanel</value>
</data>
<data name="&gt;&gt;bnL1.ZOrder" xml:space="preserve">
<value>19</value>
<value>17</value>
</data>
<data name="bnOptions.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
@ -811,7 +811,7 @@
<value>MainPanel</value>
</data>
<data name="&gt;&gt;bnOptions.ZOrder" xml:space="preserve">
<value>20</value>
<value>18</value>
</data>
<data name="bnPS.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
@ -844,7 +844,7 @@
<value>MainPanel</value>
</data>
<data name="&gt;&gt;bnPS.ZOrder" xml:space="preserve">
<value>21</value>
<value>19</value>
</data>
<data name="bnShare.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
@ -877,7 +877,7 @@
<value>MainPanel</value>
</data>
<data name="&gt;&gt;bnShare.ZOrder" xml:space="preserve">
<value>22</value>
<value>20</value>
</data>
<data name="MainPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 42</value>
@ -6784,7 +6784,7 @@ with profile</value>
<value>advColorDialog</value>
</data>
<data name="&gt;&gt;advColorDialog.Type" xml:space="preserve">
<value>ScpServer.AdvancedColorDialog, DS4Windows, Version=1.4.0.6, Culture=neutral, PublicKeyToken=null</value>
<value>ScpServer.AdvancedColorDialog, DS4Windows, Version=1.4.0.61, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>Options</value>

View File

@ -20,7 +20,7 @@ namespace ScpServer
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
static void Main(string [] args)
{
System.Runtime.GCSettings.LatencyMode = System.Runtime.GCLatencyMode.LowLatency;
try
@ -38,7 +38,7 @@ namespace ScpServer
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new ScpForm());
Application.Run(new ScpForm(args));
}
else
{

View File

@ -32,5 +32,5 @@ 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.0.61")]
[assembly: AssemblyFileVersion("1.4.0.61")]
[assembly: AssemblyVersion("1.4.0.7")]
[assembly: AssemblyFileVersion("1.4.0.7")]

View File

@ -18,6 +18,7 @@ namespace ScpServer
{
public partial class ScpForm : Form
{
public string[] arguements;
private DS4Control.Control rootHub;
delegate void LogDebugDelegate(DateTime Time, String Data);
@ -80,10 +81,10 @@ namespace ScpServer
[DllImport("psapi.dll")]
private static extern uint GetModuleFileNameEx(IntPtr hWnd, IntPtr hModule, StringBuilder lpFileName, int nSize);
public ScpForm()
public ScpForm(string [] args)
{
InitializeComponent();
arguements = args;
ThemeUtil.SetTheme(lvDebug);
SetupArrays();
//CheckDrivers();
@ -228,8 +229,14 @@ namespace ScpServer
}
LoadP();
Global.ControllerStatusChange += ControllerStatusChange;
ControllerStatusChanged();
if (btnStartStop.Enabled)
bool start = true;
foreach (string s in arguements)
if (s == "stop")
{
start = false;
break;
}
if (btnStartStop.Enabled && start)
btnStartStop_Clicked();
startToolStripMenuItem.Text = btnStartStop.Text;
cBNotifications.Checked = Global.getNotifications();
@ -246,7 +253,7 @@ namespace ScpServer
cBUpdateTime.SelectedIndex = 0;
nUDUpdateTime.Value = checkwhen;
}
Uri url = new Uri("https://dl.dropboxusercontent.com/u/16364552/DS4Windows/newest%20version.txt"); //Sorry other devs, gonna have to find your own server
Uri url = new Uri("http://ds4windows.com/Files/Builds/newest.txt"); //Sorry other devs, gonna have to find your own server
if (checkwhen > 0 && DateTime.Now >= Global.getLastChecked() + TimeSpan.FromHours(checkwhen))
@ -397,14 +404,14 @@ namespace ScpServer
if (!File.Exists(exepath + "\\DS4Updater.exe") || (File.Exists(exepath + "\\DS4Updater.exe")
&& (FileVersionInfo.GetVersionInfo(exepath + "\\DS4Updater.exe").FileVersion.CompareTo("1.1.0.0") == -1)))
{
Uri url2 = new Uri("https://dl.dropboxusercontent.com/u/16364552/DS4Windows/DS4Updater.exe");
Uri url2 = new Uri("http://ds4windows.com/Files/DS4Updater.exe");
WebClient wc2 = new WebClient();
if (Global.appdatapath == exepath)
wc2.DownloadFile(url2, exepath + "\\DS4Updater.exe");
else
{
MessageBox.Show(Properties.Resources.PleaseDownloadUpdater);
Process.Start("https://www.dropbox.com/s/tlqtdkdumdo0yir/DS4Updater.exe");
Process.Start("http://ds4windows.com/Files/DS4Updater.exe");
}
}
Process p = new Process();
@ -545,12 +552,14 @@ namespace ScpServer
{
this.Hide();
this.ShowInTaskbar = false;
this.FormBorderStyle = FormBorderStyle.SizableToolWindow;
}
else if (FormWindowState.Normal == this.WindowState)
{
this.Show();
this.ShowInTaskbar = true;
this.FormBorderStyle = FormBorderStyle.Sizable;
}
chData.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
}
@ -1214,7 +1223,7 @@ namespace ScpServer
private void lLBUpdate_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Uri url = new Uri("https://dl.dropboxusercontent.com/u/16364552/DS4Windows/newest%20version.txt"); //Sorry other devs, gonna have to find your own server
Uri url = new Uri("http://ds4windows.com/Files/Builds/newest.txt"); //Sorry other devs, gonna have to find your own server
WebClient wct = new WebClient();
wct.DownloadFileAsync(url, Global.appdatapath + "\\version.txt");
wct.DownloadFileCompleted += wct_DownloadFileCompleted;
@ -1237,14 +1246,14 @@ namespace ScpServer
if (!File.Exists(exepath + "\\DS4Updater.exe") || (File.Exists(exepath + "\\DS4Updater.exe")
&& (FileVersionInfo.GetVersionInfo(exepath + "\\DS4Updater.exe").FileVersion.CompareTo("1.1.0.0") == -1)))
{
Uri url2 = new Uri("https://dl.dropboxusercontent.com/u/16364552/DS4Windows/DS4Updater.exe");
Uri url2 = new Uri("http://ds4windows.com/Files/DS4Updater.exe");
WebClient wc2 = new WebClient();
if (Global.appdatapath == exepath)
wc2.DownloadFile(url2, exepath + "\\DS4Updater.exe");
else
{
MessageBox.Show(Properties.Resources.PleaseDownloadUpdater);
Process.Start("https://www.dropbox.com/s/tlqtdkdumdo0yir/DS4Updater.exe");
Process.Start("http://ds4windows.com/Files/DS4Updater.exe");
}
}
Process p = new Process();

View File

@ -42,7 +42,7 @@ namespace ScpServer
WebClient wb = new WebClient();
if (bnStep1.Text == Properties.Resources.Step1)
{
wb.DownloadFileAsync(new Uri("https://docs.google.com/uc?authuser=0&id=0BwPaAe9M8N9mYVdPakJ6OXpMUlU&export=download"), Global.appdatapath + "\\VBus.zip");
wb.DownloadFileAsync(new Uri("http://ds4windows.com/Files/Virtual Bus Driver.zip"), Global.appdatapath + "\\VBus.zip");
wb.DownloadProgressChanged += wb_DownloadProgressChanged;
wb.DownloadFileCompleted += wb_DownloadFileCompleted;
}