diff --git a/DS4Windows/DS4Control/ScpDevice.cs b/DS4Windows/DS4Control/ScpDevice.cs index 8055616..267f10d 100644 --- a/DS4Windows/DS4Control/ScpDevice.cs +++ b/DS4Windows/DS4Control/ScpDevice.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.InteropServices; +using System.Security; using Microsoft.Win32.SafeHandles; namespace DS4Windows { + [SuppressUnmanagedCodeSecurity] public partial class ScpDevice : Component { public virtual Boolean IsActive diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 91d917e..1e34cfd 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -506,6 +506,11 @@ namespace DS4Windows get { return m_Config.minToTaskbar; } } + public static bool GetMinToTaskbar() + { + return m_Config.minToTaskbar; + } + public static int FormWidth { set { m_Config.formWidth = value; } diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index f01d2c8..1b4f60e 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -898,14 +898,15 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question protected void Form_Resize(object sender, EventArgs e) { - if (FormWindowState.Minimized == WindowState && !MinToTaskbar) + bool minToTask = GetMinToTaskbar(); + if (FormWindowState.Minimized == WindowState && minToTask) { Hide(); ShowInTaskbar = false; FormBorderStyle = FormBorderStyle.None; } - else if (FormWindowState.Normal == WindowState && !MinToTaskbar) + else if (FormWindowState.Normal == WindowState && minToTask) { //mAllowVisible = true; Show(); diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs index 3f2542a..db239f7 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -997,9 +997,9 @@ namespace DS4Windows { pbAccel[i-6] = pbInput[i]; } - } - sixAxis.handleSixaxis(gyro, accel, cState, elapsedDeltaTime); + sixAxis.handleSixaxis(pbGyro, pbAccel, cState, elapsedDeltaTime); + } /* Debug output of incoming HID data: if (cState.L2 == 0xff && cState.R2 == 0xff) diff --git a/DS4Windows/DS4Library/DS4Sixaxis.cs b/DS4Windows/DS4Library/DS4Sixaxis.cs index 62353b5..8da297e 100644 --- a/DS4Windows/DS4Library/DS4Sixaxis.cs +++ b/DS4Windows/DS4Library/DS4Sixaxis.cs @@ -220,7 +220,7 @@ namespace DS4Windows accelZ = temInt = (int)(temInt * (current.sensNumer / (float)current.sensDenom)); } - public void handleSixaxis(byte[] gyro, byte[] accel, DS4State state, + public unsafe void handleSixaxis(byte* gyro, byte* accel, DS4State state, double elapsedDelta) { int currentYaw = (short)((ushort)(gyro[3] << 8) | gyro[2]); diff --git a/DS4Windows/Properties/AssemblyInfo.cs b/DS4Windows/Properties/AssemblyInfo.cs index 628a800..a269105 100644 --- a/DS4Windows/Properties/AssemblyInfo.cs +++ b/DS4Windows/Properties/AssemblyInfo.cs @@ -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.4.123")] -[assembly: AssemblyFileVersion("1.4.123")] +[assembly: AssemblyVersion("1.5.0")] +[assembly: AssemblyFileVersion("1.5.0")] [assembly: NeutralResourcesLanguage("en")] diff --git a/README.md b/README.md index d176060..83ef60c 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,12 @@ You can find the latest and older versions [here](https://github.com/Ryochan7/DS UdpServer builds for using Gyro motion controls in Cemu. -http://ryochan7.xyz/ds4windows/test/DS4Windows_1.4.121_UdpServer_x64.zip -http://ryochan7.xyz/ds4windows/test/DS4Windows_1.4.121_ViGEm_UdpServer_x64.zip +http://ryochan7.xyz/ds4windows/test/DS4Windows_1.4.123_UdpServer_x64.zip +http://ryochan7.xyz/ds4windows/test/DS4Windows_1.4.123_ViGEm_UdpServer_x64.zip ViGEm build. -http://ryochan7.xyz/ds4windows/test/DS4Windows_1.4.121_ViGEm_x64.zip +http://ryochan7.xyz/ds4windows/test/DS4Windows_1.4.123_ViGEm_x64.zip This project is a fork of the work of Jays2Kings. You can find the old project website at [ds4windows.com](http://ds4windows.com). diff --git a/contributors.txt b/contributors.txt index ec5e9e3..6a4f4f4 100644 --- a/contributors.txt +++ b/contributors.txt @@ -1,5 +1,6 @@ Travis Nickles (Ryochan7) Korney Czukowski (czukowski) jdfeng +Rajko Stojadinovic (rajkosto) Yuki-nyan