Skip to content
This repository has been archived by the owner on Oct 24, 2021. It is now read-only.

Commit

Permalink
Version 1.4.321
Browse files Browse the repository at this point in the history
Changed the Rainbow button to an actual button
For using the sixaxis as a mouse, changed none to Always on, also better
movement for the gyro when the sensitivity is lowered
Updated Hebrew, Chinese (Traditional), Itilian, Chinese (Simplified)
  • Loading branch information
Jays2Kings committed Dec 13, 2015
1 parent f567bfb commit fa639ba
Show file tree
Hide file tree
Showing 41 changed files with 4,575 additions and 4,702 deletions.
12 changes: 7 additions & 5 deletions DS4Windows/DS4Control/Mouse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ public Mouse(int deviceID, DS4Device d)

public virtual void sixaxisMoved(object sender, SixAxisEventArgs arg)
{
if (Global.UseSAforMouse[deviceNum])
if (Global.UseSAforMouse[deviceNum] && Global.GyroSensitivity[deviceNum] > 0)
{
bool triggeractivated = true;
int i = 0;
string[] ss = Global.SATriggers[deviceNum].Split(',');
//List<DS4Controls> ds4C = new List<DS4Controls>();
foreach (string s in ss)
if (!(int.TryParse(s, out i) && getDS4ControlsByName(i)))
triggeractivated = false;
if (!string.IsNullOrEmpty(ss[0]))
foreach (string s in ss)
if (!(int.TryParse(s, out i) && getDS4ControlsByName(i)))
triggeractivated = false;
if (triggeractivated)
cursor.sixaxisMoved(arg);
dev.getCurrentState(s);
Expand All @@ -53,6 +53,7 @@ private bool getDS4ControlsByName(int key)
{
switch (key)
{
case -1: return true;
case 0: return s.Cross;
case 1: return s.Circle;
case 2: return s.Square;
Expand All @@ -71,6 +72,7 @@ private bool getDS4ControlsByName(int key)
case 15: return s.Touch2;
case 16: return s.Options;
case 17: return s.Share;
case 18: return s.PS;
}
return false;
}
Expand Down
33 changes: 9 additions & 24 deletions DS4Windows/DS4Control/MouseCursor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,35 +28,20 @@ public virtual void sixaxisMoved(SixAxisEventArgs arg)
int deltaX = 0, deltaY = 0;
deltaX = -arg.sixAxis.accelX;
deltaY = -arg.sixAxis.accelY;
//Console.WriteLine(arg.sixAxis.deltaX);

double coefficient = Global.GyroSensitivity[deviceNumber] / 100f;
// Collect rounding errors instead of losing motion.
//Collect rounding errors instead of losing motion.
double xMotion = coefficient * deltaX;
if (xMotion > 0.0)
{
if (horizontalRemainder > 0.0)
xMotion += horizontalRemainder;
}
else if (xMotion < 0.0)
{
if (horizontalRemainder < 0.0)
xMotion += horizontalRemainder;
}
xMotion += hRemainder;
int xAction = (int)xMotion;
hRemainder = xMotion - xAction;

hRemainder += xMotion - xAction;
hRemainder -= (int)hRemainder;
double yMotion = coefficient * deltaY;
if (yMotion > 0.0)
{
if (verticalRemainder > 0.0)
yMotion += verticalRemainder;
}
else if (yMotion < 0.0)
{
if (verticalRemainder < 0.0)
yMotion += verticalRemainder;
}
yMotion += vRemainder;
int yAction = (int)yMotion;
vRemainder = yMotion - yAction;
vRemainder += yMotion - yAction;
vRemainder -= (int)vRemainder;
if (Global.GyroInvert[deviceNumber] == 2 || Global.GyroInvert[deviceNumber] == 3)
xAction *= -1;
if (Global.GyroInvert[deviceNumber] == 1 || Global.GyroInvert[deviceNumber] == 3)
Expand Down
182 changes: 50 additions & 132 deletions DS4Windows/DS4Forms/DS4Form.Designer.cs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions DS4Windows/DS4Forms/DS4Form.ar.resx
Original file line number Diff line number Diff line change
Expand Up @@ -6743,7 +6743,7 @@
<value>171, 26</value>
</data>
<data name="duplicateToolStripMenuItem.Text" xml:space="preserve">
<value>تكرير (Ctrl+C)</value>
<value>تكرير (Ctrl+D)</value>
</data>
<data name="newProfileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>171, 26</value>
Expand Down Expand Up @@ -6845,7 +6845,7 @@
<value>كرر</value>
</data>
<data name="tSBDupProfile.ToolTipText" xml:space="preserve">
<value>كرر السجل المحدد (Ctrl+C)</value>
<value>كرر السجل المحدد (Ctrl+D)</value>
</data>
<data name="tSBImportProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>77, 24</value>
Expand Down
27 changes: 5 additions & 22 deletions DS4Windows/DS4Forms/DS4Form.cs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public DS4Form(string[] args)
hotkeysTimer.Start();
hotkeysTimer.Tick += Hotkeys;
test.Tick += test_Tick;
if (!System.IO.Directory.Exists(appdatapath + "\\Virtual Bus Driver"))
if (!Directory.Exists(appdatapath + "\\Virtual Bus Driver"))
linkUninstall.Visible = false;
if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\DS4Windows.lnk"))
{
Expand Down Expand Up @@ -357,23 +357,6 @@ private async void UpdateTheUpdater()
File.Move(exepath + "\\Update Files\\DS4Updater.exe", exepath + "\\DS4Updater.exe");
Directory.Delete(exepath + "\\Update Files");
}
if(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileBuildPart == 32 &&
(!File.Exists(exepath + "\\DS4Updater.exe") ||
(File.Exists(exepath + "\\DS4Updater.exe") && FileVersionInfo.GetVersionInfo(exepath + "\\DS4Updater.exe").FileBuildPart < 32)))
{
Uri url2 = new Uri("https://github.com/Jays2Kings/DS4Windows/releases/download/v1.4.32/DS4Updater.exe");
WebClient wc2 = new WebClient();
if (appdatapath == exepath || !AdminNeeded())
{
File.Delete(exepath + "\\DS4Updater.exe");
wc2.DownloadFileAsync(url2, exepath + "\\DS4Updater.exe");
}
else
{
MessageBox.Show(Properties.Resources.PleaseDownloadUpdater);
Process.Start("https://github.com/Jays2Kings/DS4Windows/releases/download/v1.4.32/DS4Updater.exe");
}
}
}

void NewVersion()
Expand Down Expand Up @@ -480,9 +463,9 @@ private void OnPowerChange(object s, PowerModeChangedEventArgs e)

private void test_Tick(object sender, EventArgs e)
{
/*testing values
//testing values
lbTest.Visible = true;
lbTest.Text = Program.rootHub.oldtouchvalue[0].ToString();//*/
lbTest.Text = ((int)(Program.rootHub.ExposedState[0].AccelX * 2) / 2f).ToString();
}
void Hotkeys(object sender, EventArgs e)
{
Expand Down Expand Up @@ -932,13 +915,13 @@ private void lBProfiles_MouseDoubleClick(object sender, MouseEventArgs e)

private void lBProfiles_KeyDown(object sender, KeyEventArgs e)
{
if (lBProfiles.SelectedIndex >= 0 && opt == null)
if (lBProfiles.SelectedIndex >= 0 && !opt.Visible)
{
if (e.KeyValue == 13)
ShowOptions(4, lBProfiles.SelectedItem.ToString());
if (e.KeyValue == 46)
tsBDeleteProfle_Click(this, e);
if (e.KeyValue == 67 && e.Modifiers == Keys.Control)
if (e.KeyValue == 68 && e.Modifiers == Keys.Control)
tSBDupProfile_Click(this, e);
}

Expand Down
2 changes: 1 addition & 1 deletion DS4Windows/DS4Forms/DS4Form.de-DE.resx
Original file line number Diff line number Diff line change
Expand Up @@ -6744,7 +6744,7 @@
<value>226, 26</value>
</data>
<data name="duplicateToolStripMenuItem.Text" xml:space="preserve">
<value>Kopieren (Strg+C)</value>
<value>Kopieren (Strg+D)</value>
</data>
<data name="newProfileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>226, 26</value>
Expand Down
4 changes: 2 additions & 2 deletions DS4Windows/DS4Forms/DS4Form.es.resx
Original file line number Diff line number Diff line change
Expand Up @@ -6743,7 +6743,7 @@
<value>240, 24</value>
</data>
<data name="duplicateToolStripMenuItem.Text" xml:space="preserve">
<value>Duplicar (Ctrl+C)</value>
<value>Duplicar (Ctrl+D)</value>
</data>
<data name="newProfileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>240, 24</value>
Expand Down Expand Up @@ -6851,7 +6851,7 @@
<value>Duplicar</value>
</data>
<data name="tSBDupProfile.ToolTipText" xml:space="preserve">
<value>Duplicar perfil seleccionado (Ctrl+C)</value>
<value>Duplicar perfil seleccionado (Ctrl+D)</value>
</data>
<data name="tSBImportProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>91, 24</value>
Expand Down
2 changes: 1 addition & 1 deletion DS4Windows/DS4Forms/DS4Form.fr-FR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -6773,7 +6773,7 @@
<value>206, 26</value>
</data>
<data name="duplicateToolStripMenuItem.Text" xml:space="preserve">
<value>Dupliquer (Ctrl+C)</value>
<value>Dupliquer (Ctrl+D)</value>
</data>
<data name="newProfileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>206, 26</value>
Expand Down
25 changes: 14 additions & 11 deletions DS4Windows/DS4Forms/DS4Form.he.resx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<value>זמן</value>
</data>
<data name="chData.Text" xml:space="preserve">
<value>דאטה</value>
<value>נתונים</value>
</data>
<data name="btnStartStop.Text" xml:space="preserve">
<value>התחל</value>
Expand Down Expand Up @@ -6366,7 +6366,7 @@
<value>בקרים</value>
</data>
<data name="btnConnectDS4Win10.Text" xml:space="preserve">
<value>התחבר ל-DS4 בלעדית</value>
<value>התחבר ל-DS4 בלעדית (ניסיוני)</value>
</data>
<data name="bnLight3.Location" type="System.Drawing.Point, System.Drawing">
<value>1085, 94</value>
Expand Down Expand Up @@ -6716,37 +6716,37 @@
<value>186, 26</value>
</data>
<data name="assignToController1ToolStripMenuItem.Text" xml:space="preserve">
<value>הגדר בבקר 1</value>
<value>הגדר כבקר 1</value>
</data>
<data name="assignToController2ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 26</value>
</data>
<data name="assignToController2ToolStripMenuItem.Text" xml:space="preserve">
<value>הגדר בבקר 2</value>
<value>הגדר כבקר 2</value>
</data>
<data name="assignToController3ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 26</value>
</data>
<data name="assignToController3ToolStripMenuItem.Text" xml:space="preserve">
<value>הגדר בבקר 3</value>
<value>הגדר כבקר 3</value>
</data>
<data name="assignToController4ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 26</value>
</data>
<data name="assignToController4ToolStripMenuItem.Text" xml:space="preserve">
<value>הגדר בבקר 4</value>
<value>הגדר כבקר 4</value>
</data>
<data name="deleteToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 26</value>
</data>
<data name="deleteToolStripMenuItem.Text" xml:space="preserve">
<value>מחיקה (Delete)</value>
<value>מחק (Delete)</value>
</data>
<data name="duplicateToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 26</value>
</data>
<data name="duplicateToolStripMenuItem.Text" xml:space="preserve">
<value>שכפל (Ctrl+C)</value>
<value>שכפל (Ctrl+D)</value>
</data>
<data name="newProfileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 26</value>
Expand Down Expand Up @@ -6851,7 +6851,7 @@
<value>שכפל</value>
</data>
<data name="tSBDupProfile.ToolTipText" xml:space="preserve">
<value>שכפל את הפרופיל הנבחר</value>
<value>שכפל את הפרופיל הנבחר (Ctrl+D)</value>
</data>
<data name="tSBImportProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>60, 24</value>
Expand All @@ -6860,7 +6860,7 @@
<value>ייבא</value>
</data>
<data name="tSBImportProfile.ToolTipText" xml:space="preserve">
<value>ייבא את הפרופיל הנבחר</value>
<value>ייבא פרופיל/ים</value>
</data>
<data name="tSBExportProfile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Expand Down Expand Up @@ -6940,7 +6940,7 @@
<value>224, 21</value>
</data>
<data name="cBDisconnectBT.Text" xml:space="preserve">
<value>נתק Bluetooth בעת השימוש בבקר</value>
<value>נתק Bluetooth בעת הסגירה</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>269, 28</value>
Expand Down Expand Up @@ -7065,4 +7065,7 @@
<data name="useCustomColorToolStripMenuItem.Text" xml:space="preserve">
<value>שימוש בצבע מסוים</value>
</data>
<data name="cBCloseMini.Text" xml:space="preserve">
<value>סגירה ממזערת</value>
</data>
</root>
31 changes: 29 additions & 2 deletions DS4Windows/DS4Forms/DS4Form.it-IT.resx
Original file line number Diff line number Diff line change
Expand Up @@ -6737,7 +6737,7 @@
<value>233, 26</value>
</data>
<data name="duplicateToolStripMenuItem.Text" xml:space="preserve">
<value>Duplica (Ctrl+C)</value>
<value>Duplica (Ctrl+D)</value>
</data>
<data name="newProfileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>233, 26</value>
Expand Down Expand Up @@ -6845,7 +6845,7 @@
<value>Duplica</value>
</data>
<data name="tSBDupProfile.ToolTipText" xml:space="preserve">
<value>Duplica Profilo Selezionato (Ctrl+C)</value>
<value>Duplica Profilo Selezionato (Ctrl+D)</value>
</data>
<data name="tSBImportProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>86, 24</value>
Expand Down Expand Up @@ -7035,4 +7035,31 @@
<data name="tabLog.Text" xml:space="preserve">
<value>Registro</value>
</data>
<data name="btnConnectDS4Win10.Text" xml:space="preserve">
<value>Connetti Solo DS4 (sperimentale)</value>
</data>
<data name="cBoxNotifications.Items" xml:space="preserve">
<value>Nessuno</value>
</data>
<data name="cBoxNotifications.Items1" xml:space="preserve">
<value>Solo Avvisi</value>
</data>
<data name="cBoxNotifications.Items2" xml:space="preserve">
<value>Tutto</value>
</data>
<data name="chData.Text" xml:space="preserve">
<value>Data</value>
</data>
<data name="lbID.Text" xml:space="preserve">
<value>ID</value>
</data>
<data name="llbHelp.Text" xml:space="preserve">
<value>Hotkeys/About</value>
</data>
<data name="useCustomColorToolStripMenuItem.Text" xml:space="preserve">
<value>Usa Colore Personalizzato</value>
</data>
<data name="useProfileColorToolStripMenuItem.Text" xml:space="preserve">
<value>Usa Colore Profilo</value>
</data>
</root>
4 changes: 2 additions & 2 deletions DS4Windows/DS4Forms/DS4Form.pt-BR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -6746,7 +6746,7 @@
<value>202, 26</value>
</data>
<data name="duplicateToolStripMenuItem.Text" xml:space="preserve">
<value>Duplicar (Ctrl+C)</value>
<value>Duplicar (Ctrl+D)</value>
</data>
<data name="newProfileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>202, 26</value>
Expand Down Expand Up @@ -6854,7 +6854,7 @@
<value>Duplicar</value>
</data>
<data name="tSBDupProfile.ToolTipText" xml:space="preserve">
<value>Duplicar perfil selecionado (Ctrl+C)</value>
<value>Duplicar perfil selecionado (Ctrl+D)</value>
</data>
<data name="tSBImportProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>91, 24</value>
Expand Down
Loading

0 comments on commit fa639ba

Please sign in to comment.