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.156
Browse files Browse the repository at this point in the history
Significant CPU usage decrease by reworking how single instances work,
on a mobile i7 for example with a single controller connected usage went
from 4-6% to .5-1.5%. With no controllers connected the usage went from
2.5-4.5% to 0%!
As mentioned before, single instances has been reworked, so trying to
relaunch DS4W more reliably opens the previous instance
Fixed Shift modifier not working if main controls were not modified
Fixed Tilt Left for Shift modifier
Fixed default text of shift controls
Remove touchpad movement notification when swipe for controls is enabled
Can test the rumble motors separately via Heavy and Light
Truly implemented Flush HID (I think)
Slight change in profiles, when loading profiles in for the first time
in this new version, there may be a slight delay
Updated French Translations
Removed mouse moving as an option for touch swipes controls, as they
weren't implemented nor have a purpose to be
  • Loading branch information
Jays2Kings committed Nov 18, 2014
1 parent a4e59ca commit b4a6249
Show file tree
Hide file tree
Showing 36 changed files with 5,312 additions and 4,991 deletions.
6 changes: 4 additions & 2 deletions DS4Control/Control.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@ protected virtual void On_Report(object sender, EventArgs e)

if (ind != -1)
{
if (Global.getFlushHIDQueue(ind))
device.FlushHID();
device.getExposedState(ExposedState[ind], CurrentState[ind]);
DS4State cState = CurrentState[ind];
device.getPreviousState(PreviousState[ind]);
Expand All @@ -406,7 +408,7 @@ protected virtual void On_Report(object sender, EventArgs e)
CheckForHotkeys(ind, cState, pState);
GetInputkeys(ind);

if (Global.getHasCustomKeysorButtons(ind))
if (Global.getHasCustomKeysorButtons(ind) || Global.getHasShiftCustomKeysorButtons(ind))
{
if (!recordingMacro)
Mapping.MapCustom(ind, cState, MappedState[ind], ExposedState[ind], touchPad[ind]);
Expand Down Expand Up @@ -534,7 +536,7 @@ protected virtual void CheckForHotkeys(int deviceID, DS4State cState, DS4State p
d = null;
}
}
if (cState.Touch1 && pState.PS)
if (!Global.getUseTPforControls(deviceID) && cState.Touch1 && pState.PS)
{
if (Global.getTouchSensitivity(deviceID) > 0 && touchreleased[deviceID])
{
Expand Down
182 changes: 117 additions & 65 deletions DS4Control/ScpUtil.cs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions DS4Library/DS4Device.cs
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,10 @@ private void performDs4Input()
}
}

public void FlushHID()
{
hDevice.flush_Queue();
}
private void sendOutputReport(bool synchronous)
{
setTestRumble();
Expand Down
4 changes: 2 additions & 2 deletions DS4Tool.sln
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30501.0
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS4Library", "DS4Library\DS4Library.csproj", "{43E14DAD-E6E8-4B66-AC50-20F5CF9B9712}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HidLibrary", "HidLibrary\HidLibrary.csproj", "{9E8F1D50-74EA-4C60-BD5C-AB2C5B53BC66}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS4Control", "DS4Control\DS4Control.csproj", "{B0AD793E-BAEB-435F-BB40-D647DE2BC2BF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS4Tool", "DS4Tool\DS4Tool.csproj", "{B1081607-B630-4F57-9580-8A4897145890}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS4Windows", "DS4Tool\DS4Windows.csproj", "{B1081607-B630-4F57-9580-8A4897145890}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS4Service", "DS4Service\DS4Service.csproj", "{04CCD3D1-2ABC-4B5F-90D9-641D8DEC7127}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion DS4Tool/AdvancedColorDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Runtime.InteropServices;
using System.Windows.Forms;

namespace ScpServer
namespace DS4Windows
{
[System.ComponentModel.DesignerCategory("")]
public class AdvancedColorDialog : ColorDialog
Expand Down
2 changes: 1 addition & 1 deletion DS4Tool/Alreadyrunning.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion DS4Tool/Alreadyrunning.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ScpServer
namespace DS4Windows
{
public partial class Alreadyrunning : Form
{
Expand Down
22 changes: 11 additions & 11 deletions DS4Tool/DS4Form.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 6 additions & 13 deletions DS4Tool/DS4Form.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
using System.Xml;
using System.Text;
using System.Globalization;
namespace ScpServer
namespace DS4Windows
{
public partial class DS4Form : Form
{
Expand All @@ -28,7 +28,7 @@ public partial class DS4Form : Form
protected PictureBox[] statPB;
protected ToolStripMenuItem[] shortcuts;
WebClient wc = new WebClient();
Timer test = new Timer(), hotkeystimer = new Timer();
Timer test = new Timer(), hotkeysTimer = new Timer();
string exepath = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName;
string appdatapath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool";
float dpix, dpiy;
Expand Down Expand Up @@ -233,8 +233,8 @@ public DS4Form(string[] args)
File.Delete(exepath + "\\Updater.exe");
}
//test.Start();
hotkeystimer.Start();
hotkeystimer.Tick += Hotkeys;
hotkeysTimer.Start();
hotkeysTimer.Tick += Hotkeys;
test.Tick += test_Tick;
if (!System.IO.Directory.Exists(Global.appdatapath + "\\Virtual Bus Driver"))
linkUninstall.Visible = false;
Expand Down Expand Up @@ -330,13 +330,6 @@ void Hotkeys(object sender, EventArgs e)
Global.LoadProfile(j, false, rootHub);
}
}
if (Process.GetProcessesByName("DS4Tool").Length + Process.GetProcessesByName("DS4Windows").Length > 1)
{//The second process closes and this one comes in focus
Show();
WindowState = FormWindowState.Normal;
ShowInTaskbar = true;
Focus();
}
GC.Collect();
}

Expand Down Expand Up @@ -582,14 +575,14 @@ public void btnStartStop_Clicked(bool log = true)
if (btnStartStop.Text == Properties.Resources.StartText)
{
rootHub.Start(log);
hotkeystimer.Start();
hotkeysTimer.Start();
btnStartStop.Text = Properties.Resources.StopText;
}

else if (btnStartStop.Text == Properties.Resources.StopText)
{
rootHub.Stop(log);
hotkeystimer.Stop();
hotkeysTimer.Stop();
btnStartStop.Text = Properties.Resources.StartText;
}
startToolStripMenuItem.Text = btnStartStop.Text;
Expand Down
7 changes: 5 additions & 2 deletions DS4Tool/DS4Tool.csproj → DS4Tool/DS4Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ProjectGuid>{B1081607-B630-4F57-9580-8A4897145890}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ScpServer</RootNamespace>
<RootNamespace>DS4Windows</RootNamespace>
<AssemblyName>DS4Windows</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
Expand Down Expand Up @@ -59,7 +59,7 @@
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<StartupObject>ScpServer.Program</StartupObject>
<StartupObject>DS4Windows.Program</StartupObject>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>5F2A5A97E42A73158D79996F7F3BE738271F5047</ManifestCertificateThumbprint>
Expand All @@ -81,6 +81,9 @@
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup>
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion DS4Tool/Hotkeys.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion DS4Tool/Hotkeys.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using System.Reflection;
using System.Diagnostics;

namespace ScpServer
namespace DS4Windows
{
public partial class Hotkeys : Form
{
Expand Down
Loading

0 comments on commit b4a6249

Please sign in to comment.