This commit is contained in:
mika-n 2018-12-10 20:25:59 +02:00
commit f795e08f8a
8 changed files with 20 additions and 127 deletions

View File

@ -781,28 +781,28 @@ namespace DS4Windows
if (absX <= 0.4)
{
outputX = 0.481 * absX;
outputX = 0.49 * absX;
}
else if (absX <= 0.75)
{
outputX = absX - 0.2076;
outputX = absX - 0.204;
}
else if (absX > 0.75)
{
outputX = (absX * 1.8304) - 0.8304;
outputX = (absX * 1.816) - 0.816;
}
if (absY <= 0.4)
{
outputY = 0.481 * absY;
outputY = 0.49 * absY;
}
else if (absY <= 0.75)
{
outputY = absY - 0.2076;
outputY = absY - 0.204;
}
else if (absY > 0.75)
{
outputY = (absY * 1.8304) - 0.8304;
outputY = (absY * 1.816) - 0.816;
}
dState.LX = (byte)(outputX * signX * 127.5 + 127.5);
@ -841,28 +841,28 @@ namespace DS4Windows
if (absX <= 0.4)
{
outputX = 0.481 * absX;
outputX = 0.49 * absX;
}
else if (absX <= 0.75)
{
outputX = absX - 0.2076;
outputX = absX - 0.204;
}
else if (absX > 0.75)
{
outputX = (absX * 1.8304) - 0.8304;
outputX = (absX * 1.816) - 0.816;
}
if (absY <= 0.4)
{
outputY = 0.481 * absY;
outputY = 0.49 * absY;
}
else if (absY <= 0.75)
{
outputY = absY - 0.2076;
outputY = absY - 0.204;
}
else if (absY > 0.75)
{
outputY = (absY * 1.8304) - 0.8304;
outputY = (absY * 1.816) - 0.816;
}
dState.RX = (byte)(outputX * signX * 127.5 + 127.5);

View File

@ -1,36 +0,0 @@
namespace DS4Windows
{
partial class ScpDevice
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
}
}

View File

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Security;
@ -9,7 +8,7 @@ using Microsoft.Win32.SafeHandles;
namespace DS4Windows
{
[SuppressUnmanagedCodeSecurity]
public partial class ScpDevice : Component
public class ScpDevice
{
public virtual Boolean IsActive
{
@ -21,23 +20,8 @@ namespace DS4Windows
get { return m_Path; }
}
public ScpDevice()
{
InitializeComponent();
}
public ScpDevice(IContainer container)
{
container.Add(this);
InitializeComponent();
}
public ScpDevice(String Class)
{
InitializeComponent();
this.m_Class = new Guid(Class);
}

View File

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
@ -9,7 +8,7 @@ using System.Drawing; // Point struct
namespace DS4Windows
{
public partial class X360Device : ScpDevice
public class X360Device : ScpDevice
{
private const String DS3_BUS_CLASS_GUID = "{F679F562-3164-42CE-A4DB-E7DDBE723909}";
private const int CONTROLLER_OFFSET = 1; // Device 0 is the virtual USB hub itself, and we leave devices 1-10 available for other software (like the Scarlet.Crush DualShock driver itself)
@ -43,18 +42,8 @@ namespace DS4Windows
public X360Device()
: base(DS3_BUS_CLASS_GUID)
{
InitializeComponent();
}
public X360Device(IContainer container)
: base(DS3_BUS_CLASS_GUID)
{
container.Add(this);
InitializeComponent();
}
/* public override Boolean Open(int Instance = 0)
{
if (base.Open(Instance))

View File

@ -1,36 +0,0 @@
namespace DS4Windows
{
partial class X360Device
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
}
}

View File

@ -39,7 +39,9 @@ namespace DS4Windows.DS4Forms
[System.Diagnostics.CodeAnalysis.SuppressMessage("InvariantCultureText_Changed call will complete when ready, no need for a warning", "CS4014:Await.Warning")]
set {
InvariantCultureTextValue = value;
#pragma warning disable CS4014
InvariantCultureText_Changed(value);
#pragma warning restore CS4014
}
}

View File

@ -137,20 +137,10 @@
<Compile Include="DS4Control\Mouse.cs" />
<Compile Include="DS4Control\MouseCursor.cs" />
<Compile Include="DS4Control\MouseWheel.cs" />
<Compile Include="DS4Control\ScpDevice.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="DS4Control\ScpDevice.Designer.cs">
<DependentUpon>ScpDevice.cs</DependentUpon>
</Compile>
<Compile Include="DS4Control\ScpDevice.cs" />
<Compile Include="DS4Control\ScpUtil.cs" />
<Compile Include="DS4Control\UdpServer.cs" />
<Compile Include="DS4Control\X360Device.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="DS4Control\X360Device.designer.cs">
<DependentUpon>X360Device.cs</DependentUpon>
</Compile>
<Compile Include="DS4Control\X360Device.cs" />
<Compile Include="DS4Forms\LanguagePackComboBox.cs">
<SubType>UserControl</SubType>
</Compile>

View File

@ -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.5.17")]
[assembly: AssemblyFileVersion("1.5.17")]
[assembly: AssemblyVersion("1.5.18")]
[assembly: AssemblyFileVersion("1.5.18")]
[assembly: NeutralResourcesLanguage("en")]