This commit is contained in:
mika-n 2019-02-25 12:05:51 +02:00
commit 0ae7c77b61
7 changed files with 32 additions and 26 deletions

View File

@ -4,12 +4,12 @@ namespace DS4Windows
{
interface ITouchpadBehaviour
{
void touchesBegan(object sender, TouchpadEventArgs arg);
void touchesMoved(object sender, TouchpadEventArgs arg);
void touchButtonUp(object sender, TouchpadEventArgs arg);
void touchButtonDown(object sender, TouchpadEventArgs arg);
void touchesEnded(object sender, TouchpadEventArgs arg);
void sixaxisMoved(object sender, SixAxisEventArgs unused);
void touchUnchanged(object sender, EventArgs unused);
void touchesBegan(DS4Touchpad sender, TouchpadEventArgs arg);
void touchesMoved(DS4Touchpad sender, TouchpadEventArgs arg);
void touchButtonUp(DS4Touchpad sender, TouchpadEventArgs arg);
void touchButtonDown(DS4Touchpad sender, TouchpadEventArgs arg);
void touchesEnded(DS4Touchpad sender, TouchpadEventArgs arg);
void sixaxisMoved(DS4SixAxis sender, SixAxisEventArgs unused);
void touchUnchanged(DS4Touchpad sender, EventArgs unused);
}
}

View File

@ -71,7 +71,7 @@ namespace DS4Windows
set { toggleGyroMouse = value; ResetToggleGyroM(); } }
bool currentToggleGyroM = false;
public virtual void sixaxisMoved(object sender, SixAxisEventArgs arg)
public virtual void sixaxisMoved(DS4SixAxis sender, SixAxisEventArgs arg)
{
if (Global.isUsingSAforMouse(deviceNum) && Global.getGyroSensitivity(deviceNum) > 0)
{
@ -156,7 +156,7 @@ namespace DS4Windows
}
private bool tempBool = false;
public virtual void touchesMoved(object sender, TouchpadEventArgs arg)
public virtual void touchesMoved(DS4Touchpad sender, TouchpadEventArgs arg)
{
s = dev.getCurrentStateRef();
@ -210,7 +210,7 @@ namespace DS4Windows
synthesizeMouseButtons();
}
public virtual void touchesBegan(object sender, TouchpadEventArgs arg)
public virtual void touchesBegan(DS4Touchpad sender, TouchpadEventArgs arg)
{
if (!Global.UseTPforControls[deviceNum])
{
@ -243,7 +243,7 @@ namespace DS4Windows
synthesizeMouseButtons();
}
public virtual void touchesEnded(object sender, TouchpadEventArgs arg)
public virtual void touchesEnded(DS4Touchpad sender, TouchpadEventArgs arg)
{
s = dev.getCurrentStateRef();
slideright = slideleft = false;
@ -375,7 +375,7 @@ namespace DS4Windows
return t.hwX >= 1920 * 2 / 5;
}
public virtual void touchUnchanged(object sender, EventArgs unused)
public virtual void touchUnchanged(DS4Touchpad sender, EventArgs unused)
{
s = dev.getCurrentStateRef();
@ -491,7 +491,7 @@ namespace DS4Windows
}
}
public virtual void touchButtonUp(object sender, TouchpadEventArgs arg)
public virtual void touchButtonUp(DS4Touchpad sender, TouchpadEventArgs arg)
{
pushed = DS4Controls.None;
upperDown = leftDown = rightDown = multiDown = false;
@ -501,7 +501,7 @@ namespace DS4Windows
synthesizeMouseButtons();
}
public virtual void touchButtonDown(object sender, TouchpadEventArgs arg)
public virtual void touchButtonDown(DS4Touchpad sender, TouchpadEventArgs arg)
{
if (arg.touches == null)
upperDown = true;

View File

@ -63,7 +63,7 @@ namespace DS4Windows
{ "DS4Windows v" + FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion,
string.Empty, string.Empty, string.Empty, string.Empty };
private const string UPDATER_VERSION = "1.3.0";
private const string UPDATER_VERSION = "1.3.1";
private const int WM_QUERYENDSESSION = 0x11;
private const int WM_CLOSE = 0x10;
internal string updaterExe = Environment.Is64BitProcess ? "DS4Updater.exe" : "DS4Updater_x86.exe";

View File

@ -2,6 +2,8 @@
namespace DS4Windows
{
public delegate void SixAxisHandler<TEventArgs>(DS4SixAxis sender, TEventArgs args);
public class SixAxisEventArgs : EventArgs
{
public readonly SixAxis sixAxis;
@ -110,7 +112,8 @@ namespace DS4Windows
public class DS4SixAxis
{
public event EventHandler<SixAxisEventArgs> SixAccelMoved = null;
//public event EventHandler<SixAxisEventArgs> SixAccelMoved = null;
public event SixAxisHandler<SixAxisEventArgs> SixAccelMoved = null;
private SixAxis sPrev = null, now = null;
private CalibData[] calibrationData = new CalibData[6] { new CalibData(), new CalibData(),
new CalibData(), new CalibData(), new CalibData(), new CalibData()

View File

@ -52,13 +52,16 @@ namespace DS4Windows
public class DS4Touchpad
{
public event EventHandler<TouchpadEventArgs> TouchesBegan = null; // finger one or two landed (or both, or one then two, or two then one; any touches[] count increase)
public event EventHandler<TouchpadEventArgs> TouchesMoved = null; // deltaX/deltaY are set because one or both fingers were already down on a prior sensor reading
public event EventHandler<TouchpadEventArgs> TouchesEnded = null; // all fingers lifted
public event EventHandler<TouchpadEventArgs> TouchButtonDown = null; // touchpad pushed down until the button clicks
public event EventHandler<TouchpadEventArgs> TouchButtonUp = null; // touchpad button released
public event EventHandler<EventArgs> TouchUnchanged = null; // no status change for the touchpad itself... but other sensors may have changed, or you may just want to do some processing
public event EventHandler<EventArgs> PreTouchProcess = null; // used to publish that a touch packet is about to be processed
public delegate void TouchHandler<TEventArgs>(DS4Touchpad sender, TEventArgs args);
public event TouchHandler<TouchpadEventArgs> TouchesBegan = null; // finger one or two landed (or both, or one then two, or two then one; any touches[] count increase)
public event TouchHandler<TouchpadEventArgs> TouchesMoved = null; // deltaX/deltaY are set because one or both fingers were already down on a prior sensor reading
public event TouchHandler<TouchpadEventArgs> TouchesEnded = null; // all fingers lifted
public event TouchHandler<TouchpadEventArgs> TouchButtonDown = null; // touchpad pushed down until the button clicks
public event TouchHandler<TouchpadEventArgs> TouchButtonUp = null; // touchpad button released
public event TouchHandler<EventArgs> TouchUnchanged = null; // no status change for the touchpad itself... but other sensors may have changed, or you may just want to do some processing
public event TouchHandler<EventArgs> PreTouchProcess = null; // used to publish that a touch packet is about to be processed
//public event EventHandler<EventArgs> PreTouchProcess = null; // used to publish that a touch packet is about to be processed
public readonly static int TOUCHPAD_DATA_OFFSET = 35;
internal int lastTouchPadX1, lastTouchPadY1,

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.6.11")]
[assembly: AssemblyFileVersion("1.6.11")]
[assembly: AssemblyVersion("1.6.12")]
[assembly: AssemblyFileVersion("1.6.12")]
[assembly: NeutralResourcesLanguage("en")]

View File

@ -1 +1 @@
1.6.11
1.6.12