2014-03-28 02:50:40 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Xml;
|
2014-05-28 04:49:58 +02:00
|
|
|
|
using System.Drawing;
|
2015-02-08 22:51:52 +01:00
|
|
|
|
|
2014-06-12 20:46:00 +02:00
|
|
|
|
using System.Security.Principal;
|
2015-02-08 22:51:52 +01:00
|
|
|
|
namespace DS4Windows
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
|
|
|
|
[Flags]
|
2014-06-14 21:14:27 +02:00
|
|
|
|
public enum DS4KeyType : byte { None = 0, ScanCode = 1, Toggle = 2, Unbound = 4, Macro = 8, HoldMacro = 16, RepeatMacro = 32 }; //Increment by exponents of 2*, starting at 2^0
|
2014-03-28 02:50:40 +01:00
|
|
|
|
public enum Ds3PadId : byte { None = 0xFF, One = 0x00, Two = 0x01, Three = 0x02, Four = 0x03, All = 0x04 };
|
2014-11-15 22:54:14 +01:00
|
|
|
|
public enum DS4Controls : byte { None, LXNeg, LXPos, LYNeg, LYPos, RXNeg, RXPos, RYNeg, RYPos, L1, L2, L3, R1, R2, R3, Square, Triangle, Circle, Cross, DpadUp, DpadRight, DpadDown, DpadLeft, PS, TouchLeft, TouchUpper, TouchMulti, TouchRight, Share, Options, GyroXPos, GyroXNeg, GyroZPos, GyroZNeg, SwipeLeft, SwipeRight, SwipeUp, SwipeDown };
|
2014-04-29 23:56:58 +02:00
|
|
|
|
public enum X360Controls : byte { None, LXNeg, LXPos, LYNeg, LYPos, RXNeg, RXPos, RYNeg, RYPos, LB, LT, LS, RB, RT, RS, X, Y, B, A, DpadUp, DpadRight, DpadDown, DpadLeft, Guide, Back, Start, LeftMouse, RightMouse, MiddleMouse, FourthMouse, FifthMouse, WUP, WDOWN, MouseUp, MouseDown, MouseLeft, MouseRight, Unbound };
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
public class DS4ControlSettings
|
|
|
|
|
{
|
|
|
|
|
public DS4Controls control;
|
2017-03-28 17:27:15 +02:00
|
|
|
|
//public string extras = "0,0,0,0,0,0,0,0";
|
|
|
|
|
public string extras = null;
|
2015-12-18 07:25:51 +01:00
|
|
|
|
public DS4KeyType keyType = DS4KeyType.None;
|
|
|
|
|
public enum ActionType : byte { Default, Key, Button, Macro };
|
|
|
|
|
public ActionType actionType = ActionType.Default;
|
|
|
|
|
public object action = null;
|
|
|
|
|
public ActionType shiftActionType = ActionType.Default;
|
|
|
|
|
public object shiftAction = null;
|
|
|
|
|
public int shiftTrigger = 0;
|
2017-03-28 17:27:15 +02:00
|
|
|
|
//public string shiftExtras = "0,0,0,0,0,0,0,0";
|
|
|
|
|
public string shiftExtras = null;
|
2015-12-18 07:25:51 +01:00
|
|
|
|
public DS4KeyType shiftKeyType = DS4KeyType.None;
|
|
|
|
|
|
|
|
|
|
public DS4ControlSettings(DS4Controls ctrl)
|
|
|
|
|
{
|
|
|
|
|
control = ctrl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Reset()
|
|
|
|
|
{
|
2017-03-28 17:27:15 +02:00
|
|
|
|
//extras = "0,0,0,0,0,0,0,0";
|
|
|
|
|
extras = null;
|
2015-12-18 07:25:51 +01:00
|
|
|
|
keyType = DS4KeyType.None;
|
|
|
|
|
actionType = ActionType.Default;
|
|
|
|
|
action = null;
|
|
|
|
|
shiftActionType = ActionType.Default;
|
|
|
|
|
shiftAction = null;
|
|
|
|
|
shiftTrigger = 0;
|
2017-03-28 17:27:15 +02:00
|
|
|
|
//shiftExtras = "0,0,0,0,0,0,0,0";
|
|
|
|
|
shiftExtras = null;
|
2015-12-18 07:25:51 +01:00
|
|
|
|
shiftKeyType = DS4KeyType.None;
|
|
|
|
|
}
|
2017-04-26 10:00:05 +02:00
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
internal void UpdateSettings(bool shift, object act, string exts, DS4KeyType kt, int trigger = 0)
|
|
|
|
|
{
|
|
|
|
|
if (!shift)
|
|
|
|
|
{
|
|
|
|
|
if (act is int || act is ushort)
|
|
|
|
|
actionType = ActionType.Key;
|
|
|
|
|
else if (act is string || act is X360Controls)
|
|
|
|
|
actionType = ActionType.Button;
|
|
|
|
|
else if (act is int[])
|
|
|
|
|
actionType = ActionType.Macro;
|
|
|
|
|
else
|
|
|
|
|
actionType = ActionType.Default;
|
2017-04-21 05:09:08 +02:00
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
action = act;
|
|
|
|
|
extras = exts;
|
|
|
|
|
keyType = kt;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (act is int || act is ushort)
|
|
|
|
|
shiftActionType = ActionType.Key;
|
|
|
|
|
else if (act is string || act is X360Controls)
|
|
|
|
|
shiftActionType = ActionType.Button;
|
|
|
|
|
else if (act is int[])
|
|
|
|
|
shiftActionType = ActionType.Macro;
|
|
|
|
|
else
|
|
|
|
|
shiftActionType = ActionType.Default;
|
2017-04-21 05:09:08 +02:00
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
shiftAction = act;
|
|
|
|
|
shiftExtras = exts;
|
|
|
|
|
shiftKeyType = kt;
|
|
|
|
|
shiftTrigger = trigger;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-03-28 02:50:40 +01:00
|
|
|
|
public class DebugEventArgs : EventArgs
|
|
|
|
|
{
|
|
|
|
|
protected DateTime m_Time = DateTime.Now;
|
|
|
|
|
protected String m_Data = String.Empty;
|
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
|
|
|
|
protected bool warning = false;
|
|
|
|
|
public DebugEventArgs(String Data, bool warn)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
|
|
|
|
m_Data = Data;
|
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
|
|
|
|
warning = warn;
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
|
|
|
|
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public DateTime Time => m_Time;
|
|
|
|
|
public String Data => m_Data;
|
|
|
|
|
public bool Warning => warning;
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class MappingDoneEventArgs : EventArgs
|
|
|
|
|
{
|
|
|
|
|
protected int deviceNum = -1;
|
|
|
|
|
|
|
|
|
|
public MappingDoneEventArgs(int DeviceID)
|
|
|
|
|
{
|
|
|
|
|
deviceNum = DeviceID;
|
|
|
|
|
}
|
|
|
|
|
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public int DeviceID => deviceNum;
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ReportEventArgs : EventArgs
|
|
|
|
|
{
|
|
|
|
|
protected Ds3PadId m_Pad = Ds3PadId.None;
|
|
|
|
|
protected Byte[] m_Report = new Byte[64];
|
|
|
|
|
|
|
|
|
|
public ReportEventArgs()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ReportEventArgs(Ds3PadId Pad)
|
|
|
|
|
{
|
|
|
|
|
m_Pad = Pad;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Ds3PadId Pad
|
|
|
|
|
{
|
|
|
|
|
get { return m_Pad; }
|
|
|
|
|
set { m_Pad = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Byte[] Report
|
|
|
|
|
{
|
|
|
|
|
get { return m_Report; }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-26 10:00:05 +02:00
|
|
|
|
public class BatteryReportArgs : EventArgs
|
2017-04-25 11:24:14 +02:00
|
|
|
|
{
|
|
|
|
|
private int index;
|
|
|
|
|
private int level;
|
|
|
|
|
|
|
|
|
|
public BatteryReportArgs(int index, int level)
|
|
|
|
|
{
|
|
|
|
|
this.index = index;
|
|
|
|
|
this.level = level;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getIndex()
|
|
|
|
|
{
|
|
|
|
|
return this.index;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getLevel()
|
|
|
|
|
{
|
|
|
|
|
return this.level;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-26 10:00:05 +02:00
|
|
|
|
public class ControllerRemovedArgs : EventArgs
|
|
|
|
|
{
|
|
|
|
|
private int index;
|
|
|
|
|
|
|
|
|
|
public ControllerRemovedArgs(int index)
|
|
|
|
|
{
|
|
|
|
|
this.index = index;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getIndex()
|
|
|
|
|
{
|
|
|
|
|
return this.index;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-29 10:19:45 +02:00
|
|
|
|
public class DeviceStatusChangeEventArgs : EventArgs
|
|
|
|
|
{
|
|
|
|
|
private int index;
|
|
|
|
|
|
|
|
|
|
public DeviceStatusChangeEventArgs(int index)
|
|
|
|
|
{
|
|
|
|
|
this.index = index;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getIndex()
|
|
|
|
|
{
|
|
|
|
|
return index;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-24 11:43:56 +02:00
|
|
|
|
public class MultiValueDict<Key, Value> : Dictionary<Key, List<Value>>
|
|
|
|
|
{
|
|
|
|
|
public void Add(Key key, Value val)
|
|
|
|
|
{
|
|
|
|
|
List<Value> values = null;
|
|
|
|
|
if (!this.TryGetValue(key, out values))
|
|
|
|
|
{
|
|
|
|
|
values = new List<Value>();
|
|
|
|
|
this.Add(key, values);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
values.Add(val);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-03-28 02:50:40 +01:00
|
|
|
|
public class Global
|
|
|
|
|
{
|
|
|
|
|
protected static BackingStore m_Config = new BackingStore();
|
|
|
|
|
protected static Int32 m_IdleTimeout = 600000;
|
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
|
|
|
|
static string exepath = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName;
|
|
|
|
|
public static string appdatapath;
|
2017-04-26 05:07:02 +02:00
|
|
|
|
public static bool runHotPlug = false;
|
2014-09-15 04:37:14 +02:00
|
|
|
|
public static string[] tempprofilename = new string[5] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
|
2017-03-23 05:45:20 +01:00
|
|
|
|
public static bool[] tempprofileDistance = new bool[5] { false, false, false, false, false };
|
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
|
|
|
|
|
2017-04-11 22:57:39 +02:00
|
|
|
|
public static X360Controls[] defaultButtonMapping = { X360Controls.None, X360Controls.LXNeg, X360Controls.LXPos,
|
|
|
|
|
X360Controls.LYNeg, X360Controls.LYPos, X360Controls.RXNeg, X360Controls.RXPos, X360Controls.RYNeg, X360Controls.RYPos,
|
|
|
|
|
X360Controls.LB, X360Controls.LT, X360Controls.LS, X360Controls.RB, X360Controls.RT, X360Controls.RS, X360Controls.X,
|
|
|
|
|
X360Controls.Y, X360Controls.B, X360Controls.A, X360Controls.DpadUp, X360Controls.DpadRight, X360Controls.DpadDown,
|
|
|
|
|
X360Controls.DpadLeft, X360Controls.Guide, X360Controls.None, X360Controls.None, X360Controls.None, X360Controls.None,
|
2017-04-11 23:02:32 +02:00
|
|
|
|
X360Controls.Back, X360Controls.Start, X360Controls.None, X360Controls.None, X360Controls.None, X360Controls.None,
|
|
|
|
|
X360Controls.None, X360Controls.None, X360Controls.None, X360Controls.None
|
2017-04-11 22:57:39 +02:00
|
|
|
|
};
|
|
|
|
|
|
2014-06-12 20:46:00 +02:00
|
|
|
|
public static void SaveWhere(string path)
|
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
|
|
|
|
{
|
2014-06-12 20:46:00 +02:00
|
|
|
|
appdatapath = path;
|
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
|
|
|
|
m_Config.m_Profile = appdatapath + "\\Profiles.xml";
|
2014-12-13 21:12:03 +01:00
|
|
|
|
m_Config.m_Actions = appdatapath + "\\Actions.xml";
|
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
|
|
|
|
}
|
2014-06-12 20:46:00 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Check if Admin Rights are needed to write in Appliplation Directory
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static bool AdminNeeded()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
2014-06-13 21:52:25 +02:00
|
|
|
|
File.WriteAllText(exepath + "\\test.txt", "test");
|
|
|
|
|
File.Delete(exepath + "\\test.txt");
|
2014-06-12 20:46:00 +02:00
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
catch (UnauthorizedAccessException)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static bool IsAdministrator()
|
|
|
|
|
{
|
|
|
|
|
var identity = WindowsIdentity.GetCurrent();
|
|
|
|
|
var principal = new WindowsPrincipal(identity);
|
|
|
|
|
return principal.IsInRole(WindowsBuiltInRole.Administrator);
|
|
|
|
|
}
|
|
|
|
|
|
2014-03-29 06:29:08 +01:00
|
|
|
|
public static event EventHandler<EventArgs> ControllerStatusChange; // called when a controller is added/removed/battery or touchpad mode changes/etc.
|
|
|
|
|
public static void ControllerStatusChanged(object sender)
|
|
|
|
|
{
|
|
|
|
|
if (ControllerStatusChange != null)
|
|
|
|
|
ControllerStatusChange(sender, EventArgs.Empty);
|
|
|
|
|
}
|
2014-04-27 21:32:09 +02:00
|
|
|
|
|
2017-04-25 11:24:14 +02:00
|
|
|
|
public static event EventHandler<BatteryReportArgs> BatteryStatusChange;
|
|
|
|
|
public static void OnBatteryStatusChange(object sender, int index, int level)
|
|
|
|
|
{
|
|
|
|
|
if (BatteryStatusChange != null)
|
|
|
|
|
{
|
|
|
|
|
BatteryReportArgs args = new BatteryReportArgs(index, level);
|
|
|
|
|
BatteryStatusChange(sender, args);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-26 10:00:05 +02:00
|
|
|
|
public static event EventHandler<ControllerRemovedArgs> ControllerRemoved;
|
|
|
|
|
public static void OnControllerRemoved(object sender, int index)
|
|
|
|
|
{
|
|
|
|
|
if (ControllerRemoved != null)
|
|
|
|
|
{
|
|
|
|
|
ControllerRemovedArgs args = new ControllerRemovedArgs(index);
|
|
|
|
|
ControllerRemoved(sender, args);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-29 10:19:45 +02:00
|
|
|
|
public static event EventHandler<DeviceStatusChangeEventArgs> DeviceStatusChange;
|
|
|
|
|
public static void OnDeviceStatusChanged(object sender, int index)
|
|
|
|
|
{
|
|
|
|
|
if (DeviceStatusChange != null)
|
|
|
|
|
{
|
|
|
|
|
DeviceStatusChangeEventArgs args = new DeviceStatusChangeEventArgs(index);
|
|
|
|
|
DeviceStatusChange(sender, args);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// general values
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public static bool UseExclusiveMode
|
2014-04-27 21:32:09 +02:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
set { m_Config.useExclusiveMode = value; }
|
|
|
|
|
get { return m_Config.useExclusiveMode; }
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2017-04-25 11:24:14 +02:00
|
|
|
|
public static bool getUseExclusiveMode()
|
|
|
|
|
{
|
|
|
|
|
return m_Config.useExclusiveMode;
|
|
|
|
|
}
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public static DateTime LastChecked
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
set { m_Config.lastChecked = value; }
|
|
|
|
|
get { return m_Config.lastChecked; }
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
|
|
|
|
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public static int CheckWhen
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
set { m_Config.CheckWhen = value; }
|
|
|
|
|
get { return m_Config.CheckWhen; }
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static int Notifications
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
set { m_Config.notifications = value; }
|
|
|
|
|
get { return m_Config.notifications; }
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public static bool DCBTatStop
|
2014-05-31 06:37:02 +02:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
set { m_Config.disconnectBTAtStop = value; }
|
|
|
|
|
get { return m_Config.disconnectBTAtStop; }
|
2014-05-31 06:37:02 +02:00
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public static bool SwipeProfiles
|
2014-05-31 06:37:02 +02:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
set { m_Config.swipeProfiles = value; }
|
|
|
|
|
get { return m_Config.swipeProfiles; }
|
2014-05-31 06:37:02 +02:00
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public static bool DS4Mapping
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
set { m_Config.ds4Mapping = value; }
|
|
|
|
|
get { return m_Config.ds4Mapping; }
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public static bool QuickCharge
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
set { m_Config.quickCharge = value; }
|
|
|
|
|
get { return m_Config.quickCharge; }
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2017-04-25 11:24:14 +02:00
|
|
|
|
public static bool getQuickCharge()
|
|
|
|
|
{
|
|
|
|
|
return m_Config.quickCharge;
|
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public static int FirstXinputPort
|
2014-06-02 19:29:38 +02:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
set { m_Config.firstXinputPort = value; }
|
|
|
|
|
get { return m_Config.firstXinputPort; }
|
2014-06-02 19:29:38 +02:00
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public static bool CloseMini
|
2014-06-02 19:29:38 +02:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
set { m_Config.closeMini = value; }
|
|
|
|
|
get { return m_Config.closeMini; }
|
2014-06-02 19:29:38 +02:00
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public static bool StartMinimized
|
2014-08-23 22:52:20 +02:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
set { m_Config.startMinimized = value; }
|
|
|
|
|
get { return m_Config.startMinimized; }
|
2014-08-23 22:52:20 +02:00
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public static int FormWidth
|
2014-08-23 22:52:20 +02:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
set { m_Config.formWidth = value; }
|
|
|
|
|
get { return m_Config.formWidth;}
|
2014-08-23 22:52:20 +02:00
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public static int FormHeight
|
2014-09-15 04:37:14 +02:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
set { m_Config.formHeight = value; }
|
|
|
|
|
get { return m_Config.formHeight; }
|
2014-09-15 04:37:14 +02:00
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public static bool DownloadLang
|
2014-09-15 04:37:14 +02:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
set { m_Config.downloadLang = value; }
|
|
|
|
|
get { return m_Config.downloadLang; }
|
2014-09-15 04:37:14 +02:00
|
|
|
|
}
|
2015-03-15 19:16:01 +01:00
|
|
|
|
public static bool FlashWhenLate
|
|
|
|
|
{
|
|
|
|
|
set { m_Config.flashWhenLate = value; }
|
|
|
|
|
get { return m_Config.flashWhenLate; }
|
|
|
|
|
}
|
2017-04-26 10:00:05 +02:00
|
|
|
|
public static bool getFlashWhenLate()
|
|
|
|
|
{
|
|
|
|
|
return m_Config.flashWhenLate;
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static int FlashWhenLateAt
|
2014-12-03 23:36:54 +01:00
|
|
|
|
{
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
set { m_Config.flashWhenLateAt = value; }
|
|
|
|
|
get { return m_Config.flashWhenLateAt; }
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2017-03-28 10:48:02 +02:00
|
|
|
|
public static int getFlashWhenLateAt()
|
|
|
|
|
{
|
|
|
|
|
return m_Config.flashWhenLateAt;
|
|
|
|
|
}
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
public static bool UseWhiteIcon
|
|
|
|
|
{
|
|
|
|
|
set { m_Config.useWhiteIcon = value; }
|
|
|
|
|
get { return m_Config.useWhiteIcon; }
|
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
|
2017-04-29 10:19:45 +02:00
|
|
|
|
// controller/profile specfic values
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static int[] ButtonMouseSensitivity => m_Config.buttonMouseSensitivity;
|
2017-04-26 10:00:05 +02:00
|
|
|
|
public static byte[] RumbleBoost => m_Config.rumble;
|
|
|
|
|
public static byte getRumbleBoost(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.rumble[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static double[] Rainbow => m_Config.rainbow;
|
2017-04-22 04:58:27 +02:00
|
|
|
|
public static double getRainbow(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.rainbow[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static bool[] FlushHIDQueue => m_Config.flushHIDQueue;
|
2017-03-28 10:48:02 +02:00
|
|
|
|
public static bool getFlushHIDQueue(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.flushHIDQueue[index];
|
|
|
|
|
}
|
2017-04-26 23:51:15 +02:00
|
|
|
|
public static bool[] EnableTouchToggle => m_Config.enableTouchToggle;
|
|
|
|
|
public static bool getEnableTouchToggle(int index)
|
2017-04-26 21:43:01 +02:00
|
|
|
|
{
|
2017-04-26 23:51:15 +02:00
|
|
|
|
return m_Config.enableTouchToggle[index];
|
2017-04-26 21:43:01 +02:00
|
|
|
|
}
|
2017-03-28 10:48:02 +02:00
|
|
|
|
public static int[] IdleDisconnectTimeout => m_Config.idleDisconnectTimeout;
|
|
|
|
|
public static int getIdleDisconnectTimeout(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.idleDisconnectTimeout[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static byte[] TouchSensitivity => m_Config.touchSensitivity;
|
2017-03-28 10:48:02 +02:00
|
|
|
|
public static byte[] getTouchSensitivity()
|
|
|
|
|
{
|
|
|
|
|
return m_Config.touchSensitivity;
|
|
|
|
|
}
|
|
|
|
|
public static byte getTouchSensitivity(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.touchSensitivity[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static byte[] FlashType => m_Config.flashType;
|
2017-03-24 03:32:33 +01:00
|
|
|
|
public static byte getFlashType(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.flashType[index];
|
|
|
|
|
}
|
|
|
|
|
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static int[] FlashAt => m_Config.flashAt;
|
2017-03-24 03:32:33 +01:00
|
|
|
|
public static int getFlashAt(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.flashAt[index];
|
|
|
|
|
}
|
|
|
|
|
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static bool[] LedAsBatteryIndicator => m_Config.ledAsBattery;
|
2017-04-16 08:22:04 +02:00
|
|
|
|
public static bool getLedAsBatteryIndicator(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.ledAsBattery[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static int[] ChargingType => m_Config.chargingType;
|
2017-04-16 08:22:04 +02:00
|
|
|
|
public static int getChargingType(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.chargingType[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static bool[] DinputOnly => m_Config.dinputOnly;
|
2017-04-25 11:24:14 +02:00
|
|
|
|
public static bool getDInputOnly(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.dinputOnly[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static bool[] StartTouchpadOff => m_Config.startTouchpadOff;
|
|
|
|
|
public static bool[] UseTPforControls => m_Config.useTPforControls;
|
2017-03-28 10:48:02 +02:00
|
|
|
|
public static bool getUseTPforControls(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.useTPforControls[index];
|
|
|
|
|
}
|
2015-11-28 06:47:26 +01:00
|
|
|
|
public static bool[] UseSAforMouse => m_Config.useSAforMouse;
|
2017-04-14 09:55:22 +02:00
|
|
|
|
public static bool isUsingSAforMouse(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.useSAforMouse[index];
|
|
|
|
|
}
|
2015-11-28 06:47:26 +01:00
|
|
|
|
public static string[] SATriggers => m_Config.sATriggers;
|
|
|
|
|
public static int[] GyroSensitivity => m_Config.gyroSensitivity;
|
|
|
|
|
public static int[] GyroInvert => m_Config.gyroInvert;
|
2017-04-22 04:58:27 +02:00
|
|
|
|
public static DS4Color[] MainColor => m_Config.m_Leds;
|
|
|
|
|
public static DS4Color getMainColor(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.m_Leds[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static DS4Color[] LowColor => m_Config.m_LowLeds;
|
2017-04-22 04:58:27 +02:00
|
|
|
|
public static DS4Color getLowColor(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.m_LowLeds[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static DS4Color[] ChargingColor => m_Config.m_ChargingLeds;
|
2017-04-22 12:31:53 +02:00
|
|
|
|
public static DS4Color getChargingColor(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.m_ChargingLeds[index];
|
|
|
|
|
}
|
2015-11-28 06:47:26 +01:00
|
|
|
|
public static DS4Color[] CustomColor => m_Config.m_CustomLeds;
|
2017-04-22 04:58:27 +02:00
|
|
|
|
public static DS4Color getCustomColor(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.m_CustomLeds[index];
|
|
|
|
|
}
|
2015-11-28 06:47:26 +01:00
|
|
|
|
public static bool[] UseCustomLed => m_Config.useCustomLeds;
|
2017-04-22 04:58:27 +02:00
|
|
|
|
public static bool getUseCustomLed(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.useCustomLeds[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
|
2017-04-22 04:58:27 +02:00
|
|
|
|
public static DS4Color[] FlashColor => m_Config.m_FlashLeds;
|
|
|
|
|
public static DS4Color getFlashColor(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.m_FlashLeds[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static byte[] TapSensitivity => m_Config.tapSensitivity;
|
|
|
|
|
public static bool[] DoubleTap => m_Config.doubleTap;
|
|
|
|
|
public static int[] ScrollSensitivity => m_Config.scrollSensitivity;
|
2017-03-28 10:48:02 +02:00
|
|
|
|
public static int[] getScrollSensitivity()
|
|
|
|
|
{
|
|
|
|
|
return m_Config.scrollSensitivity;
|
|
|
|
|
}
|
|
|
|
|
public static int getScrollSensitivity(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.scrollSensitivity[index];
|
|
|
|
|
}
|
|
|
|
|
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static bool[] LowerRCOn => m_Config.lowerRCOn;
|
|
|
|
|
public static bool[] TouchpadJitterCompensation => m_Config.touchpadJitterCompensation;
|
|
|
|
|
|
2017-03-31 03:00:17 +02:00
|
|
|
|
public static byte[] L2Deadzone => m_Config.l2Deadzone;
|
|
|
|
|
public static byte getL2Deadzone(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.l2Deadzone[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static byte[] R2Deadzone => m_Config.r2Deadzone;
|
2017-03-31 03:00:17 +02:00
|
|
|
|
public static byte getR2Deadzone(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.r2Deadzone[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static double[] SXDeadzone => m_Config.SXDeadzone;
|
2017-04-14 09:55:22 +02:00
|
|
|
|
public static double getSXDeadzone(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.SXDeadzone[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static double[] SZDeadzone => m_Config.SZDeadzone;
|
2017-04-14 09:55:22 +02:00
|
|
|
|
public static double getSZDeadzone(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.SZDeadzone[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static int[] LSDeadzone => m_Config.LSDeadzone;
|
2017-03-31 03:00:17 +02:00
|
|
|
|
public static int getLSDeadzone(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.LSDeadzone[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static int[] RSDeadzone => m_Config.RSDeadzone;
|
2017-03-31 03:00:17 +02:00
|
|
|
|
public static int getRSDeadzone(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.RSDeadzone[index];
|
|
|
|
|
}
|
2017-03-27 05:55:05 +02:00
|
|
|
|
public static int[] LSAntiDeadzone => m_Config.LSAntiDeadzone;
|
2017-03-31 03:00:17 +02:00
|
|
|
|
public static int getLSAntiDeadzone(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.LSAntiDeadzone[index];
|
|
|
|
|
}
|
2017-03-27 05:55:05 +02:00
|
|
|
|
public static int[] RSAntiDeadzone => m_Config.RSAntiDeadzone;
|
2017-03-31 03:00:17 +02:00
|
|
|
|
public static int getRSAntiDeadzone(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.RSAntiDeadzone[index];
|
|
|
|
|
}
|
2017-03-30 09:37:01 +02:00
|
|
|
|
public static int[] L2AntiDeadzone => m_Config.l2AntiDeadzone;
|
2017-03-31 03:00:17 +02:00
|
|
|
|
public static int getL2AntiDeadzone(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.l2AntiDeadzone[index];
|
|
|
|
|
}
|
2017-03-30 09:37:01 +02:00
|
|
|
|
public static int[] R2AntiDeadzone => m_Config.r2AntiDeadzone;
|
2017-03-31 03:00:17 +02:00
|
|
|
|
public static int getR2AntiDeadzone(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.r2AntiDeadzone[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static int[] LSCurve => m_Config.lsCurve;
|
2017-03-31 03:00:17 +02:00
|
|
|
|
public static int getLSCurve(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.lsCurve[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static int[] RSCurve => m_Config.rsCurve;
|
2017-03-31 03:00:17 +02:00
|
|
|
|
public static int getRSCurve(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.rsCurve[index];
|
|
|
|
|
}
|
2015-12-05 09:55:11 +01:00
|
|
|
|
public static double[] L2Sens => m_Config.l2Sens;
|
2017-03-31 03:00:17 +02:00
|
|
|
|
public static double getL2Sens(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.l2Sens[index];
|
|
|
|
|
}
|
2015-12-05 09:55:11 +01:00
|
|
|
|
public static double[] R2Sens => m_Config.r2Sens;
|
2017-03-31 03:00:17 +02:00
|
|
|
|
public static double getR2Sens(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.r2Sens[index];
|
|
|
|
|
}
|
2015-12-05 09:55:11 +01:00
|
|
|
|
public static double[] SXSens => m_Config.SXSens;
|
2017-04-14 09:55:22 +02:00
|
|
|
|
public static double getSXSens(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.SXSens[index];
|
|
|
|
|
}
|
2015-12-05 09:55:11 +01:00
|
|
|
|
public static double[] SZSens => m_Config.SZSens;
|
2017-04-14 09:55:22 +02:00
|
|
|
|
public static double getSZSens(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.SZSens[index];
|
|
|
|
|
}
|
2015-12-05 09:55:11 +01:00
|
|
|
|
public static double[] LSSens => m_Config.LSSens;
|
2017-03-31 03:00:17 +02:00
|
|
|
|
public static double getLSSens(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.LSSens[index];
|
|
|
|
|
}
|
2015-12-05 09:55:11 +01:00
|
|
|
|
public static double[] RSSens => m_Config.RSSens;
|
2017-03-31 03:00:17 +02:00
|
|
|
|
public static double getRSSens(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.RSSens[index];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static bool[] MouseAccel => m_Config.mouseAccel;
|
2017-04-21 15:29:25 +02:00
|
|
|
|
public static bool getMouseAccel(int device)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.mouseAccel[device];
|
|
|
|
|
}
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static string[] LaunchProgram => m_Config.launchProgram;
|
|
|
|
|
public static string[] ProfilePath => m_Config.profilePath;
|
2017-03-24 03:32:33 +01:00
|
|
|
|
public static bool[] DistanceProfiles = m_Config.distanceProfiles;
|
2015-12-05 09:55:11 +01:00
|
|
|
|
public static List<string>[] ProfileActions => m_Config.profileActions;
|
2017-04-02 02:46:51 +02:00
|
|
|
|
public static int getProfileActionCount(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.profileActionCount[index];
|
|
|
|
|
}
|
|
|
|
|
public static void calculateProfileActionCount(int index)
|
|
|
|
|
{
|
|
|
|
|
m_Config.profileActionCount[index] = m_Config.profileActions[index].Count;
|
|
|
|
|
}
|
2017-03-30 15:14:58 +02:00
|
|
|
|
public static List<string> getProfileActions(int index)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.profileActions[index];
|
|
|
|
|
}
|
2015-12-18 07:25:51 +01:00
|
|
|
|
|
|
|
|
|
public static void UpdateDS4CSetting (int deviceNum, string buttonName, bool shift, object action, string exts, DS4KeyType kt, int trigger = 0)
|
|
|
|
|
{
|
|
|
|
|
m_Config.UpdateDS4CSetting(deviceNum, buttonName, shift, action, exts, kt, trigger);
|
2017-03-28 17:27:15 +02:00
|
|
|
|
m_Config.containsCustomAction[deviceNum] = m_Config.HasCustomActions(deviceNum);
|
|
|
|
|
m_Config.containsCustomExtras[deviceNum] = m_Config.HasCustomExtras(deviceNum);
|
2015-12-18 07:25:51 +01:00
|
|
|
|
}
|
|
|
|
|
public static void UpdateDS4Extra(int deviceNum, string buttonName, bool shift, string exts)
|
|
|
|
|
{
|
|
|
|
|
m_Config.UpdateDS4CExtra(deviceNum, buttonName, shift, exts);
|
2017-03-28 17:27:15 +02:00
|
|
|
|
m_Config.containsCustomAction[deviceNum] = m_Config.HasCustomActions(deviceNum);
|
|
|
|
|
m_Config.containsCustomExtras[deviceNum] = m_Config.HasCustomExtras(deviceNum);
|
2015-12-18 07:25:51 +01:00
|
|
|
|
}
|
|
|
|
|
|
2017-04-01 07:42:10 +02:00
|
|
|
|
public static object GetDS4Action(int deviceNum, string buttonName, bool shift) => m_Config.GetDS4Action(deviceNum, buttonName, shift);
|
|
|
|
|
public static object GetDS4Action(int deviceNum, DS4Controls control, bool shift) => m_Config.GetDS4Action(deviceNum, control, shift);
|
2015-12-18 07:25:51 +01:00
|
|
|
|
public static DS4KeyType GetDS4KeyType(int deviceNum, string buttonName, bool shift) => m_Config.GetDS4KeyType(deviceNum, buttonName, shift);
|
|
|
|
|
public static string GetDS4Extra(int deviceNum, string buttonName, bool shift) => m_Config.GetDS4Extra(deviceNum, buttonName, shift);
|
|
|
|
|
public static int GetDS4STrigger(int deviceNum, string buttonName) => m_Config.GetDS4STrigger(deviceNum, buttonName);
|
2017-03-30 16:07:04 +02:00
|
|
|
|
public static int GetDS4STrigger(int deviceNum, DS4Controls control) => m_Config.GetDS4STrigger(deviceNum, control);
|
2015-12-18 07:25:51 +01:00
|
|
|
|
public static List<DS4ControlSettings> getDS4CSettings(int device) => m_Config.ds4settings[device];
|
|
|
|
|
public static DS4ControlSettings getDS4CSetting(int deviceNum, string control) => m_Config.getDS4CSetting(deviceNum, control);
|
2017-03-30 16:07:04 +02:00
|
|
|
|
public static DS4ControlSettings getDS4CSetting(int deviceNum, DS4Controls control) => m_Config.getDS4CSetting(deviceNum, control);
|
2015-12-18 07:25:51 +01:00
|
|
|
|
public static bool HasCustomAction(int deviceNum) => m_Config.HasCustomActions(deviceNum);
|
|
|
|
|
public static bool HasCustomExtras(int deviceNum) => m_Config.HasCustomExtras(deviceNum);
|
2017-03-28 17:27:15 +02:00
|
|
|
|
public static bool containsCustomAction(int deviceNum)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.containsCustomAction[deviceNum];
|
|
|
|
|
}
|
|
|
|
|
public static bool containsCustomExtras(int deviceNum)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.containsCustomExtras[deviceNum];
|
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
|
2015-03-15 19:16:01 +01:00
|
|
|
|
public static void SaveAction(string name, string controls, int mode, string details, bool edit, string extras = "")
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
{
|
2015-03-15 19:16:01 +01:00
|
|
|
|
m_Config.SaveAction(name, controls, mode, details, edit, extras);
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
Mapping.actionDone.Add(new Mapping.ActionState());
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
|
|
|
|
|
public static void RemoveAction(string name)
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
m_Config.RemoveAction(name);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static bool LoadActions() => m_Config.LoadActions();
|
2015-02-08 22:51:52 +01:00
|
|
|
|
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static List<SpecialAction> GetActions() => m_Config.actions;
|
2015-02-08 22:51:52 +01:00
|
|
|
|
|
|
|
|
|
public static int GetActionIndexOf(string name)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2017-04-01 07:42:10 +02:00
|
|
|
|
for (int i = 0, actionCount = m_Config.actions.Count; i < actionCount; i++)
|
2017-04-22 09:26:44 +02:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
if (m_Config.actions[i].name == name)
|
|
|
|
|
return i;
|
2017-04-22 09:26:44 +02:00
|
|
|
|
}
|
|
|
|
|
|
2015-02-08 22:51:52 +01:00
|
|
|
|
return -1;
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
|
2017-04-02 02:46:51 +02:00
|
|
|
|
public static int GetProfileActionIndexOf(int device, string name)
|
|
|
|
|
{
|
|
|
|
|
int index = -1;
|
|
|
|
|
m_Config.profileActionIndexDict[device].TryGetValue(name, out index);
|
|
|
|
|
return index;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public static SpecialAction GetAction(string name)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
foreach (SpecialAction sA in m_Config.actions)
|
|
|
|
|
if (sA.name == name)
|
|
|
|
|
return sA;
|
|
|
|
|
return new SpecialAction("null", "null", "null", "null");
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
|
2017-04-02 02:46:51 +02:00
|
|
|
|
public static SpecialAction GetProfileAction(int device, string name)
|
|
|
|
|
{
|
2017-04-11 08:19:24 +02:00
|
|
|
|
SpecialAction sA = null;
|
2017-04-02 02:46:51 +02:00
|
|
|
|
m_Config.profileActionDict[device].TryGetValue(name, out sA);
|
|
|
|
|
return sA;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void calculateProfileActionDicts(int device)
|
|
|
|
|
{
|
|
|
|
|
m_Config.profileActionDict[device].Clear();
|
|
|
|
|
m_Config.profileActionIndexDict[device].Clear();
|
|
|
|
|
|
|
|
|
|
foreach (string actionname in m_Config.profileActions[device])
|
|
|
|
|
{
|
|
|
|
|
m_Config.profileActionDict[device].Add(actionname, Global.GetAction(actionname));
|
|
|
|
|
m_Config.profileActionIndexDict[device].Add(actionname, Global.GetActionIndexOf(actionname));
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-02-08 22:51:52 +01:00
|
|
|
|
|
2017-04-11 22:57:39 +02:00
|
|
|
|
public static X360Controls getX360ControlsByName(string key)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.getX360ControlsByName(key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static string getX360ControlString(X360Controls key)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.getX360ControlString(key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static DS4Controls getDS4ControlsByName(string key)
|
|
|
|
|
{
|
|
|
|
|
return m_Config.getDS4ControlsByName(key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static X360Controls getDefaultX360ControlBinding(DS4Controls dc)
|
|
|
|
|
{
|
|
|
|
|
return defaultButtonMapping[(int)dc];
|
|
|
|
|
}
|
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
/*public static X360Controls getCustomButton(int device, DS4Controls controlName) => m_Config.GetCustomButton(device, controlName);
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
|
|
|
|
|
public static ushort getCustomKey(int device, DS4Controls controlName) => m_Config.GetCustomKey(device, controlName);
|
|
|
|
|
|
|
|
|
|
public static string getCustomMacro(int device, DS4Controls controlName) => m_Config.GetCustomMacro(device, controlName);
|
|
|
|
|
|
|
|
|
|
public static string getCustomExtras(int device, DS4Controls controlName) => m_Config.GetCustomExtras(device, controlName);
|
|
|
|
|
|
|
|
|
|
public static DS4KeyType getCustomKeyType(int device, DS4Controls controlName) => m_Config.GetCustomKeyType(device, controlName);
|
|
|
|
|
|
|
|
|
|
public static bool getHasCustomKeysorButtons(int device) => m_Config.customMapButtons[device].Count > 0
|
2014-04-29 11:19:00 +02:00
|
|
|
|
|| m_Config.customMapKeys[device].Count > 0;
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
|
|
|
|
|
public static bool getHasCustomExtras(int device) => m_Config.customMapExtras[device].Count > 0;
|
|
|
|
|
public static Dictionary<DS4Controls, X360Controls> getCustomButtons(int device) => m_Config.customMapButtons[device];
|
|
|
|
|
public static Dictionary<DS4Controls, ushort> getCustomKeys(int device) => m_Config.customMapKeys[device];
|
|
|
|
|
public static Dictionary<DS4Controls, string> getCustomMacros(int device) => m_Config.customMapMacros[device];
|
|
|
|
|
public static Dictionary<DS4Controls, string> getCustomExtras(int device) => m_Config.customMapExtras[device];
|
|
|
|
|
public static Dictionary<DS4Controls, DS4KeyType> getCustomKeyTypes(int device) => m_Config.customMapKeyTypes[device];
|
|
|
|
|
|
|
|
|
|
public static X360Controls getShiftCustomButton(int device, DS4Controls controlName) => m_Config.GetShiftCustomButton(device, controlName);
|
|
|
|
|
public static ushort getShiftCustomKey(int device, DS4Controls controlName) => m_Config.GetShiftCustomKey(device, controlName);
|
|
|
|
|
public static string getShiftCustomMacro(int device, DS4Controls controlName) => m_Config.GetShiftCustomMacro(device, controlName);
|
|
|
|
|
public static string getShiftCustomExtras(int device, DS4Controls controlName) => m_Config.GetShiftCustomExtras(device, controlName);
|
|
|
|
|
public static DS4KeyType getShiftCustomKeyType(int device, DS4Controls controlName) => m_Config.GetShiftCustomKeyType(device, controlName);
|
|
|
|
|
public static bool getHasShiftCustomKeysorButtons(int device) => m_Config.shiftCustomMapButtons[device].Count > 0
|
|
|
|
|
|| m_Config.shiftCustomMapKeys[device].Count > 0;
|
|
|
|
|
public static bool getHasShiftCustomExtras(int device) => m_Config.shiftCustomMapExtras[device].Count > 0;
|
|
|
|
|
public static Dictionary<DS4Controls, X360Controls> getShiftCustomButtons(int device) => m_Config.shiftCustomMapButtons[device];
|
|
|
|
|
public static Dictionary<DS4Controls, ushort> getShiftCustomKeys(int device) => m_Config.shiftCustomMapKeys[device];
|
|
|
|
|
public static Dictionary<DS4Controls, string> getShiftCustomMacros(int device) => m_Config.shiftCustomMapMacros[device];
|
|
|
|
|
public static Dictionary<DS4Controls, string> getShiftCustomExtras(int device) => m_Config.shiftCustomMapExtras[device];
|
2017-04-11 22:57:39 +02:00
|
|
|
|
public static Dictionary<DS4Controls, DS4KeyType> getShiftCustomKeyTypes(int device) => m_Config.shiftCustomMapKeyTypes[device]; */
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public static bool Load() => m_Config.Load();
|
|
|
|
|
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public static void LoadProfile(int device, bool launchprogram, ControlService control)
|
2014-04-27 21:32:09 +02:00
|
|
|
|
{
|
2015-12-18 07:25:51 +01:00
|
|
|
|
m_Config.LoadProfile(device, launchprogram, control);
|
2014-09-15 04:37:14 +02:00
|
|
|
|
tempprofilename[device] = string.Empty;
|
2017-03-23 05:45:20 +01:00
|
|
|
|
tempprofileDistance[device] = false;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
2015-12-18 07:25:51 +01:00
|
|
|
|
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public static void LoadTempProfile(int device, string name, bool launchprogram, ControlService control)
|
2014-06-06 22:38:52 +02:00
|
|
|
|
{
|
2015-12-18 07:25:51 +01:00
|
|
|
|
m_Config.LoadProfile(device, launchprogram, control, appdatapath + @"\Profiles\" + name + ".xml");
|
2014-09-15 04:37:14 +02:00
|
|
|
|
tempprofilename[device] = name;
|
2017-03-23 05:45:20 +01:00
|
|
|
|
tempprofileDistance[device] = name.ToLower().Contains("distance");
|
2014-06-06 22:38:52 +02:00
|
|
|
|
}
|
2015-12-18 07:25:51 +01:00
|
|
|
|
|
2014-06-12 20:46:00 +02:00
|
|
|
|
public static bool Save()
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2014-06-12 20:46:00 +02:00
|
|
|
|
return m_Config.Save();
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
public static void SaveProfile(int device, string propath)
|
2014-04-27 21:32:09 +02:00
|
|
|
|
{
|
2015-12-18 07:25:51 +01:00
|
|
|
|
m_Config.SaveProfile(device, propath);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
|
|
|
|
|
2014-06-02 19:29:38 +02:00
|
|
|
|
private static byte applyRatio(byte b1, byte b2, double r)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2017-04-22 04:58:27 +02:00
|
|
|
|
if (r > 100.0)
|
|
|
|
|
r = 100.0;
|
|
|
|
|
else if (r < 0.0)
|
|
|
|
|
r = 0.0;
|
|
|
|
|
|
|
|
|
|
r /= 100.0;
|
|
|
|
|
return (byte)Math.Round((b1 * (1 - r) + b2 * r), 0);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2017-04-22 04:58:27 +02:00
|
|
|
|
|
2014-06-02 19:29:38 +02:00
|
|
|
|
public static DS4Color getTransitionedColor(DS4Color c1, DS4Color c2, double ratio)
|
2017-04-22 04:58:27 +02:00
|
|
|
|
{
|
2014-09-02 01:23:02 +02:00
|
|
|
|
//Color cs = Color.FromArgb(c1.red, c1.green, c1.blue);
|
2014-03-29 06:29:08 +01:00
|
|
|
|
c1.red = applyRatio(c1.red, c2.red, ratio);
|
|
|
|
|
c1.green = applyRatio(c1.green, c2.green, ratio);
|
|
|
|
|
c1.blue = applyRatio(c1.blue, c2.blue, ratio);
|
|
|
|
|
return c1;
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2014-05-28 21:47:25 +02:00
|
|
|
|
|
|
|
|
|
private static Color applyRatio(Color c1, Color c2, uint r)
|
|
|
|
|
{
|
|
|
|
|
float ratio = r / 100f;
|
|
|
|
|
float hue1 = c1.GetHue();
|
|
|
|
|
float hue2 = c2.GetHue();
|
|
|
|
|
float bri1 = c1.GetBrightness();
|
|
|
|
|
float bri2 = c2.GetBrightness();
|
|
|
|
|
float sat1 = c1.GetSaturation();
|
|
|
|
|
float sat2 = c2.GetSaturation();
|
|
|
|
|
float hr = hue2 - hue1;
|
|
|
|
|
float br = bri2 - bri1;
|
|
|
|
|
float sr = sat2 - sat1;
|
|
|
|
|
Color csR;
|
|
|
|
|
if (bri1 == 0)
|
|
|
|
|
csR = HuetoRGB(hue2,sat2,bri2 - br*ratio);
|
|
|
|
|
else
|
|
|
|
|
csR = HuetoRGB(hue2 - hr * ratio, sat2 - sr * ratio, bri2 - br * ratio);
|
2017-04-22 04:58:27 +02:00
|
|
|
|
|
2014-05-28 21:47:25 +02:00
|
|
|
|
return csR;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static Color HuetoRGB(float hue, float sat, float bri)
|
|
|
|
|
{
|
|
|
|
|
float C = (1-Math.Abs(2*bri)-1)* sat;
|
|
|
|
|
float X = C * (1 - Math.Abs((hue / 60) % 2 - 1));
|
|
|
|
|
float m = bri - C / 2;
|
|
|
|
|
float R, G, B;
|
|
|
|
|
if (0 <= hue && hue < 60)
|
2017-04-22 04:58:27 +02:00
|
|
|
|
{
|
|
|
|
|
R = C; G = X; B = 0;
|
|
|
|
|
}
|
2014-05-28 21:47:25 +02:00
|
|
|
|
else if (60 <= hue && hue < 120)
|
2017-04-22 04:58:27 +02:00
|
|
|
|
{
|
|
|
|
|
R = X; G = C; B = 0;
|
|
|
|
|
}
|
2014-05-28 21:47:25 +02:00
|
|
|
|
else if (120 <= hue && hue < 180)
|
2017-04-22 04:58:27 +02:00
|
|
|
|
{
|
|
|
|
|
R = 0; G = C; B = X;
|
|
|
|
|
}
|
2014-05-28 21:47:25 +02:00
|
|
|
|
else if (180 <= hue && hue < 240)
|
2017-04-22 04:58:27 +02:00
|
|
|
|
{
|
|
|
|
|
R = 0; G = X; B = C;
|
|
|
|
|
}
|
2014-05-28 21:47:25 +02:00
|
|
|
|
else if (240 <= hue && hue < 300)
|
2017-04-22 04:58:27 +02:00
|
|
|
|
{
|
|
|
|
|
R = X; G = 0; B = C;
|
|
|
|
|
}
|
2014-05-28 21:47:25 +02:00
|
|
|
|
else if (300 <= hue && hue < 360)
|
2017-04-22 04:58:27 +02:00
|
|
|
|
{
|
|
|
|
|
R = C; G = 0; B = X;
|
|
|
|
|
}
|
2014-05-28 21:47:25 +02:00
|
|
|
|
else
|
2017-04-22 04:58:27 +02:00
|
|
|
|
{
|
|
|
|
|
R = 255; G = 0; B = 0;
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-28 21:47:25 +02:00
|
|
|
|
R += m; G += m; B += m;
|
2017-04-22 04:58:27 +02:00
|
|
|
|
R *= 255.0f; G *= 255.0f; B *= 255.0f;
|
2014-05-28 21:47:25 +02:00
|
|
|
|
return Color.FromArgb((int)R, (int)G, (int)B);
|
|
|
|
|
}
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class BackingStore
|
|
|
|
|
{
|
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
|
|
|
|
//public String m_Profile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool" + "\\Profiles.xml";
|
|
|
|
|
public String m_Profile = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName + "\\Profiles.xml";
|
2014-12-13 21:12:03 +01:00
|
|
|
|
public String m_Actions = Global.appdatapath + "\\Actions.xml";
|
|
|
|
|
|
2014-03-28 02:50:40 +01:00
|
|
|
|
protected XmlDocument m_Xdoc = new XmlDocument();
|
2014-05-30 22:39:39 +02:00
|
|
|
|
//fifth value used to for options, not fifth controller
|
|
|
|
|
public int[] buttonMouseSensitivity = { 25, 25, 25, 25, 25 };
|
2014-09-15 04:37:14 +02:00
|
|
|
|
|
2017-03-19 09:29:45 +01:00
|
|
|
|
public bool[] flushHIDQueue = { false, false, false, false, false };
|
2017-04-26 23:51:15 +02:00
|
|
|
|
public bool[] enableTouchToggle = { true, true, true, true, true };
|
2014-09-15 04:37:14 +02:00
|
|
|
|
public int[] idleDisconnectTimeout = { 0, 0, 0, 0, 0 };
|
|
|
|
|
public Boolean[] touchpadJitterCompensation = { true, true, true, true, true };
|
2014-05-30 22:39:39 +02:00
|
|
|
|
public Boolean[] lowerRCOn = { false, false, false, false, false };
|
|
|
|
|
public Boolean[] ledAsBattery = { false, false, false, false, false };
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public Byte[] flashType = { 0, 0, 0, 0, 0 };
|
2014-05-30 22:39:39 +02:00
|
|
|
|
public String[] profilePath = { String.Empty, String.Empty, String.Empty, String.Empty, String.Empty };
|
2017-03-23 05:45:20 +01:00
|
|
|
|
// Cache properties instead of performing a string comparison every frame
|
|
|
|
|
public bool[] distanceProfiles = { false, false, false, false, false };
|
2014-12-13 21:12:03 +01:00
|
|
|
|
public Byte[] rumble = { 100, 100, 100, 100, 100 };
|
2014-05-30 22:39:39 +02:00
|
|
|
|
public Byte[] touchSensitivity = { 100, 100, 100, 100, 100 };
|
2015-12-05 09:55:11 +01:00
|
|
|
|
public Byte[] l2Deadzone = { 0, 0, 0, 0, 0 }, r2Deadzone = { 0, 0, 0, 0, 0 };
|
2015-04-21 21:00:09 +02:00
|
|
|
|
public int[] LSDeadzone = { 0, 0, 0, 0, 0 }, RSDeadzone = { 0, 0, 0, 0, 0 };
|
2017-03-27 05:55:05 +02:00
|
|
|
|
public int[] LSAntiDeadzone = { 0, 0, 0, 0, 0 }, RSAntiDeadzone = { 0, 0, 0, 0, 0 };
|
2017-03-30 09:37:01 +02:00
|
|
|
|
public int[] l2AntiDeadzone = { 0, 0, 0, 0, 0 }, r2AntiDeadzone = { 0, 0, 0, 0, 0 };
|
2014-06-26 20:02:01 +02:00
|
|
|
|
public double[] SXDeadzone = { 0.25, 0.25, 0.25, 0.25, 0.25 }, SZDeadzone = { 0.25, 0.25, 0.25, 0.25, 0.25 };
|
2015-12-05 09:55:11 +01:00
|
|
|
|
public double[] l2Sens = { 1, 1, 1, 1, 1 }, r2Sens = { 1, 1, 1, 1, 1 };
|
|
|
|
|
public double[] LSSens = { 1, 1, 1, 1, 1 }, RSSens = { 1, 1, 1, 1, 1 };
|
|
|
|
|
public double[] SXSens = { 1, 1, 1, 1, 1 }, SZSens = { 1, 1, 1, 1, 1 };
|
2014-05-30 22:39:39 +02:00
|
|
|
|
public Byte[] tapSensitivity = { 0, 0, 0, 0, 0 };
|
|
|
|
|
public bool[] doubleTap = { false, false, false, false, false };
|
|
|
|
|
public int[] scrollSensitivity = { 0, 0, 0, 0, 0 };
|
|
|
|
|
public double[] rainbow = { 0, 0, 0, 0, 0 };
|
2014-09-15 04:37:14 +02:00
|
|
|
|
public int[] flashAt = { 0, 0, 0, 0, 0 };
|
2014-06-26 20:02:01 +02:00
|
|
|
|
public bool[] mouseAccel = { true, true, true, true, true };
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public DS4Color[] m_LowLeds = new DS4Color[]
|
2014-04-29 10:01:13 +02:00
|
|
|
|
{
|
2017-04-22 09:26:44 +02:00
|
|
|
|
new DS4Color(Color.Black),
|
2015-02-08 22:51:52 +01:00
|
|
|
|
new DS4Color(Color.Black),
|
|
|
|
|
new DS4Color(Color.Black),
|
|
|
|
|
new DS4Color(Color.Black),
|
|
|
|
|
new DS4Color(Color.Black)
|
2014-04-29 10:01:13 +02:00
|
|
|
|
};
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public DS4Color[] m_Leds = new DS4Color[]
|
2014-04-29 10:01:13 +02:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
new DS4Color(Color.Blue),
|
|
|
|
|
new DS4Color(Color.Red),
|
|
|
|
|
new DS4Color(Color.Green),
|
|
|
|
|
new DS4Color(Color.Pink),
|
|
|
|
|
new DS4Color(Color.White)
|
2014-04-29 10:01:13 +02:00
|
|
|
|
};
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public DS4Color[] m_ChargingLeds = new DS4Color[]
|
2014-06-02 19:29:38 +02:00
|
|
|
|
{
|
2017-04-22 09:26:44 +02:00
|
|
|
|
new DS4Color(Color.Black),
|
2015-02-08 22:51:52 +01:00
|
|
|
|
new DS4Color(Color.Black),
|
|
|
|
|
new DS4Color(Color.Black),
|
|
|
|
|
new DS4Color(Color.Black),
|
|
|
|
|
new DS4Color(Color.Black)
|
2014-06-02 19:29:38 +02:00
|
|
|
|
};
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public DS4Color[] m_FlashLeds = new DS4Color[]
|
2014-08-23 22:52:20 +02:00
|
|
|
|
{
|
2017-04-22 09:26:44 +02:00
|
|
|
|
new DS4Color(Color.Black),
|
2015-02-08 22:51:52 +01:00
|
|
|
|
new DS4Color(Color.Black),
|
|
|
|
|
new DS4Color(Color.Black),
|
|
|
|
|
new DS4Color(Color.Black),
|
|
|
|
|
new DS4Color(Color.Black)
|
2014-08-23 22:52:20 +02:00
|
|
|
|
};
|
2015-11-28 06:47:26 +01:00
|
|
|
|
public bool[] useCustomLeds = new bool[] { false, false, false, false };
|
|
|
|
|
public DS4Color[] m_CustomLeds = new DS4Color[]
|
|
|
|
|
{
|
2017-04-22 09:26:44 +02:00
|
|
|
|
new DS4Color(Color.Black),
|
2015-11-28 06:47:26 +01:00
|
|
|
|
new DS4Color(Color.Black),
|
|
|
|
|
new DS4Color(Color.Black),
|
|
|
|
|
new DS4Color(Color.Black)
|
|
|
|
|
};
|
2014-06-02 19:29:38 +02:00
|
|
|
|
public int[] chargingType = { 0, 0, 0, 0, 0 };
|
2014-07-26 01:17:45 +02:00
|
|
|
|
public string[] launchProgram = { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
|
2014-08-23 22:52:20 +02:00
|
|
|
|
public bool[] dinputOnly = { false, false, false, false, false };
|
2014-09-15 04:37:14 +02:00
|
|
|
|
public bool[] startTouchpadOff = { false, false, false, false, false };
|
2014-11-15 22:54:14 +01:00
|
|
|
|
public bool[] useTPforControls = { false, false, false, false, false };
|
2015-11-28 06:47:26 +01:00
|
|
|
|
public bool[] useSAforMouse = { false, false, false, false, false };
|
|
|
|
|
public string[] sATriggers = { "", "", "", "", "" };
|
2014-12-13 21:12:03 +01:00
|
|
|
|
public int[] lsCurve = { 0, 0, 0, 0, 0 };
|
|
|
|
|
public int[] rsCurve = { 0, 0, 0, 0, 0 };
|
2014-03-28 02:50:40 +01:00
|
|
|
|
public Boolean useExclusiveMode = false;
|
|
|
|
|
public Int32 formWidth = 782;
|
|
|
|
|
public Int32 formHeight = 550;
|
|
|
|
|
public Boolean startMinimized = false;
|
2014-05-21 19:39:56 +02:00
|
|
|
|
public DateTime lastChecked;
|
2014-06-06 22:38:52 +02:00
|
|
|
|
public int CheckWhen = 1;
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
public int notifications = 2;
|
2014-06-21 20:00:28 +02:00
|
|
|
|
public bool disconnectBTAtStop = false;
|
|
|
|
|
public bool swipeProfiles = true;
|
2014-11-20 20:03:18 +01:00
|
|
|
|
public bool ds4Mapping = true;
|
|
|
|
|
public bool quickCharge = false;
|
2014-12-03 23:36:54 +01:00
|
|
|
|
public int firstXinputPort = 1;
|
2014-12-13 21:12:03 +01:00
|
|
|
|
public bool closeMini = false;
|
|
|
|
|
public List<SpecialAction> actions = new List<SpecialAction>();
|
2015-12-18 07:25:51 +01:00
|
|
|
|
public List<DS4ControlSettings>[] ds4settings = { new List<DS4ControlSettings>(), new List<DS4ControlSettings>(), new List<DS4ControlSettings>(), new List<DS4ControlSettings>(), new List<DS4ControlSettings>() };
|
|
|
|
|
/*public Dictionary<DS4Controls, DS4KeyType>[] customMapKeyTypes = { null, null, null, null, null };
|
2014-05-30 22:39:39 +02:00
|
|
|
|
public Dictionary<DS4Controls, UInt16>[] customMapKeys = { null, null, null, null, null };
|
|
|
|
|
public Dictionary<DS4Controls, String>[] customMapMacros = { null, null, null, null, null };
|
|
|
|
|
public Dictionary<DS4Controls, X360Controls>[] customMapButtons = { null, null, null, null, null };
|
2014-12-02 01:07:29 +01:00
|
|
|
|
public Dictionary<DS4Controls, String>[] customMapExtras = { null, null, null, null, null };
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
|
|
|
|
|
public Dictionary<DS4Controls, DS4KeyType>[] shiftCustomMapKeyTypes = { null, null, null, null, null };
|
|
|
|
|
public Dictionary<DS4Controls, UInt16>[] shiftCustomMapKeys = { null, null, null, null, null };
|
|
|
|
|
public Dictionary<DS4Controls, String>[] shiftCustomMapMacros = { null, null, null, null, null };
|
|
|
|
|
public Dictionary<DS4Controls, X360Controls>[] shiftCustomMapButtons = { null, null, null, null, null };
|
2015-12-18 07:25:51 +01:00
|
|
|
|
public Dictionary<DS4Controls, String>[] shiftCustomMapExtras = { null, null, null, null, null };*/
|
|
|
|
|
public List<string>[] profileActions = { null, null, null, null, null };
|
2017-04-02 02:46:51 +02:00
|
|
|
|
public int[] profileActionCount = { 0, 0, 0, 0, 0 };
|
|
|
|
|
public Dictionary<string, SpecialAction>[] profileActionDict = { new Dictionary<string, SpecialAction>(), new Dictionary<string, SpecialAction>(), new Dictionary<string, SpecialAction>(), new Dictionary<string, SpecialAction>(), new Dictionary<string, SpecialAction>() };
|
|
|
|
|
public Dictionary<string, int>[] profileActionIndexDict = { new Dictionary<string, int>(), new Dictionary<string, int>(), new Dictionary<string, int>(), new Dictionary<string, int>(), new Dictionary<string, int>() };
|
2015-02-08 22:51:52 +01:00
|
|
|
|
public bool downloadLang = true;
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
public bool useWhiteIcon;
|
2015-03-15 19:16:01 +01:00
|
|
|
|
public bool flashWhenLate = true;
|
2017-03-25 14:31:39 +01:00
|
|
|
|
public int flashWhenLateAt = 20;
|
2017-03-28 17:30:22 +02:00
|
|
|
|
// Cache whether profile has custom action
|
2017-03-28 17:27:15 +02:00
|
|
|
|
public bool[] containsCustomAction = { false, false, false, false, false };
|
2017-03-28 17:30:22 +02:00
|
|
|
|
// Cache whether profile has custom extras
|
2017-03-28 17:27:15 +02:00
|
|
|
|
public bool[] containsCustomExtras = { false, false, false, false, false };
|
2015-11-28 06:47:26 +01:00
|
|
|
|
public int[] gyroSensitivity = { 100, 100, 100, 100, 100 };
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
public int[] gyroInvert = { 0, 0, 0, 0, 0 };
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
|
2014-04-27 21:32:09 +02:00
|
|
|
|
public BackingStore()
|
|
|
|
|
{
|
2014-05-30 22:39:39 +02:00
|
|
|
|
for (int i = 0; i < 5; i++)
|
2014-04-27 21:32:09 +02:00
|
|
|
|
{
|
2015-12-18 07:25:51 +01:00
|
|
|
|
foreach (DS4Controls dc in Enum.GetValues(typeof(DS4Controls)))
|
2017-04-22 09:26:44 +02:00
|
|
|
|
{
|
2015-12-18 07:25:51 +01:00
|
|
|
|
if (dc != DS4Controls.None)
|
|
|
|
|
ds4settings[i].Add(new DS4ControlSettings(dc));
|
2017-04-22 09:26:44 +02:00
|
|
|
|
}
|
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
/*customMapKeyTypes[i] = new Dictionary<DS4Controls, DS4KeyType>();
|
2014-05-21 23:42:25 +02:00
|
|
|
|
customMapKeys[i] = new Dictionary<DS4Controls, UInt16>();
|
2014-05-28 04:49:58 +02:00
|
|
|
|
customMapMacros[i] = new Dictionary<DS4Controls, String>();
|
2014-05-21 23:42:25 +02:00
|
|
|
|
customMapButtons[i] = new Dictionary<DS4Controls, X360Controls>();
|
2014-12-02 01:07:29 +01:00
|
|
|
|
customMapExtras[i] = new Dictionary<DS4Controls, string>();
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
|
|
|
|
|
shiftCustomMapKeyTypes[i] = new Dictionary<DS4Controls, DS4KeyType>();
|
|
|
|
|
shiftCustomMapKeys[i] = new Dictionary<DS4Controls, UInt16>();
|
|
|
|
|
shiftCustomMapMacros[i] = new Dictionary<DS4Controls, String>();
|
|
|
|
|
shiftCustomMapButtons[i] = new Dictionary<DS4Controls, X360Controls>();
|
2015-12-18 07:25:51 +01:00
|
|
|
|
shiftCustomMapExtras[i] = new Dictionary<DS4Controls, string>();*/
|
2017-04-22 09:26:44 +02:00
|
|
|
|
|
2014-12-13 21:12:03 +01:00
|
|
|
|
profileActions[i] = new List<string>();
|
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
|
|
|
|
profileActions[i].Add("Disconnect Controller");
|
2017-04-02 02:46:51 +02:00
|
|
|
|
profileActionCount[i] = profileActions[i].Count;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
/*public X360Controls GetCustomButton(int device, DS4Controls controlName)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2014-04-29 11:19:00 +02:00
|
|
|
|
if (customMapButtons[device].ContainsKey(controlName))
|
|
|
|
|
return customMapButtons[device][controlName];
|
2014-04-27 21:32:09 +02:00
|
|
|
|
else return X360Controls.None;
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2014-04-27 21:32:09 +02:00
|
|
|
|
public UInt16 GetCustomKey(int device, DS4Controls controlName)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2014-04-29 11:19:00 +02:00
|
|
|
|
if (customMapKeys[device].ContainsKey(controlName))
|
|
|
|
|
return customMapKeys[device][controlName];
|
2014-03-28 02:50:40 +01:00
|
|
|
|
else return 0;
|
|
|
|
|
}
|
2014-05-28 04:49:58 +02:00
|
|
|
|
public string GetCustomMacro(int device, DS4Controls controlName)
|
|
|
|
|
{
|
|
|
|
|
if (customMapMacros[device].ContainsKey(controlName))
|
|
|
|
|
return customMapMacros[device][controlName];
|
|
|
|
|
else return "0";
|
|
|
|
|
}
|
2014-12-02 01:07:29 +01:00
|
|
|
|
public string GetCustomExtras(int device, DS4Controls controlName)
|
|
|
|
|
{
|
|
|
|
|
if (customMapExtras[device].ContainsKey(controlName))
|
|
|
|
|
return customMapExtras[device][controlName];
|
|
|
|
|
else return "0";
|
|
|
|
|
}
|
2014-04-27 21:32:09 +02:00
|
|
|
|
public DS4KeyType GetCustomKeyType(int device, DS4Controls controlName)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2014-06-03 07:29:42 +02:00
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (customMapKeyTypes[device].ContainsKey(controlName))
|
|
|
|
|
return customMapKeyTypes[device][controlName];
|
|
|
|
|
else return 0;
|
|
|
|
|
}
|
|
|
|
|
catch { return 0; }
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
|
|
|
|
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
public X360Controls GetShiftCustomButton(int device, DS4Controls controlName)
|
|
|
|
|
{
|
|
|
|
|
if (shiftCustomMapButtons[device].ContainsKey(controlName))
|
|
|
|
|
return shiftCustomMapButtons[device][controlName];
|
|
|
|
|
else return X360Controls.None;
|
|
|
|
|
}
|
|
|
|
|
public UInt16 GetShiftCustomKey(int device, DS4Controls controlName)
|
|
|
|
|
{
|
|
|
|
|
if (shiftCustomMapKeys[device].ContainsKey(controlName))
|
|
|
|
|
return shiftCustomMapKeys[device][controlName];
|
|
|
|
|
else return 0;
|
|
|
|
|
}
|
|
|
|
|
public string GetShiftCustomMacro(int device, DS4Controls controlName)
|
|
|
|
|
{
|
|
|
|
|
if (shiftCustomMapMacros[device].ContainsKey(controlName))
|
|
|
|
|
return shiftCustomMapMacros[device][controlName];
|
|
|
|
|
else return "0";
|
|
|
|
|
}
|
2014-12-02 01:07:29 +01:00
|
|
|
|
public string GetShiftCustomExtras(int device, DS4Controls controlName)
|
|
|
|
|
{
|
|
|
|
|
if (customMapExtras[device].ContainsKey(controlName))
|
|
|
|
|
return customMapExtras[device][controlName];
|
|
|
|
|
else return "0";
|
|
|
|
|
}
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
public DS4KeyType GetShiftCustomKeyType(int device, DS4Controls controlName)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (shiftCustomMapKeyTypes[device].ContainsKey(controlName))
|
|
|
|
|
return shiftCustomMapKeyTypes[device][controlName];
|
|
|
|
|
else return 0;
|
|
|
|
|
}
|
|
|
|
|
catch { return 0; }
|
2015-12-18 07:25:51 +01:00
|
|
|
|
}*/
|
2014-04-29 10:22:37 +02:00
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
public bool SaveProfile(int device, string propath)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2015-12-18 07:25:51 +01:00
|
|
|
|
bool Saved = true;
|
|
|
|
|
string path = Global.appdatapath + @"\Profiles\" + Path.GetFileNameWithoutExtension(propath) + ".xml";
|
2014-03-28 02:50:40 +01:00
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
XmlNode Node;
|
2014-11-18 22:23:41 +01:00
|
|
|
|
XmlNode xmlControls = m_Xdoc.SelectSingleNode("/DS4Windows/Control");
|
|
|
|
|
XmlNode xmlShiftControls = m_Xdoc.SelectSingleNode("/DS4Windows/ShiftControl");
|
2014-03-28 02:50:40 +01:00
|
|
|
|
m_Xdoc.RemoveAll();
|
2014-04-27 21:32:09 +02:00
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
Node = m_Xdoc.CreateXmlDeclaration("1.0", "utf-8", string.Empty);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
m_Xdoc.AppendChild(Node);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
Node = m_Xdoc.CreateComment(string.Format(" DS4Windows Configuration Data. {0} ", DateTime.Now));
|
2014-03-28 02:50:40 +01:00
|
|
|
|
m_Xdoc.AppendChild(Node);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
|
2014-03-28 02:50:40 +01:00
|
|
|
|
Node = m_Xdoc.CreateWhitespace("\r\n");
|
|
|
|
|
m_Xdoc.AppendChild(Node);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
|
2014-11-18 22:23:41 +01:00
|
|
|
|
Node = m_Xdoc.CreateNode(XmlNodeType.Element, "DS4Windows", null);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
|
2014-04-29 10:22:37 +02:00
|
|
|
|
XmlNode xmlFlushHIDQueue = m_Xdoc.CreateNode(XmlNodeType.Element, "flushHIDQueue", null); xmlFlushHIDQueue.InnerText = flushHIDQueue[device].ToString(); Node.AppendChild(xmlFlushHIDQueue);
|
2017-04-26 23:51:15 +02:00
|
|
|
|
XmlNode xmlTouchToggle = m_Xdoc.CreateNode(XmlNodeType.Element, "touchToggle", null); xmlTouchToggle.InnerText = enableTouchToggle[device].ToString(); Node.AppendChild(xmlTouchToggle);
|
2014-04-29 10:22:37 +02:00
|
|
|
|
XmlNode xmlIdleDisconnectTimeout = m_Xdoc.CreateNode(XmlNodeType.Element, "idleDisconnectTimeout", null); xmlIdleDisconnectTimeout.InnerText = idleDisconnectTimeout[device].ToString(); Node.AppendChild(xmlIdleDisconnectTimeout);
|
2014-06-26 20:02:01 +02:00
|
|
|
|
XmlNode xmlColor = m_Xdoc.CreateNode(XmlNodeType.Element, "Color", null);
|
2015-12-18 07:25:51 +01:00
|
|
|
|
xmlColor.InnerText = m_Leds[device].red.ToString() + "," + m_Leds[device].green.ToString() + "," + m_Leds[device].blue.ToString();
|
2014-06-26 20:02:01 +02:00
|
|
|
|
Node.AppendChild(xmlColor);
|
2014-12-13 21:12:03 +01:00
|
|
|
|
XmlNode xmlRumbleBoost = m_Xdoc.CreateNode(XmlNodeType.Element, "RumbleBoost", null); xmlRumbleBoost.InnerText = rumble[device].ToString(); Node.AppendChild(xmlRumbleBoost);
|
2014-04-29 10:22:37 +02:00
|
|
|
|
XmlNode xmlLedAsBatteryIndicator = m_Xdoc.CreateNode(XmlNodeType.Element, "ledAsBatteryIndicator", null); xmlLedAsBatteryIndicator.InnerText = ledAsBattery[device].ToString(); Node.AppendChild(xmlLedAsBatteryIndicator);
|
2015-02-08 22:51:52 +01:00
|
|
|
|
XmlNode xmlLowBatteryFlash = m_Xdoc.CreateNode(XmlNodeType.Element, "FlashType", null); xmlLowBatteryFlash.InnerText = flashType[device].ToString(); Node.AppendChild(xmlLowBatteryFlash);
|
2014-05-31 06:37:02 +02:00
|
|
|
|
XmlNode xmlFlashBatterAt = m_Xdoc.CreateNode(XmlNodeType.Element, "flashBatteryAt", null); xmlFlashBatterAt.InnerText = flashAt[device].ToString(); Node.AppendChild(xmlFlashBatterAt);
|
2014-04-29 10:22:37 +02:00
|
|
|
|
XmlNode xmlTouchSensitivity = m_Xdoc.CreateNode(XmlNodeType.Element, "touchSensitivity", null); xmlTouchSensitivity.InnerText = touchSensitivity[device].ToString(); Node.AppendChild(xmlTouchSensitivity);
|
2014-06-26 20:02:01 +02:00
|
|
|
|
XmlNode xmlLowColor = m_Xdoc.CreateNode(XmlNodeType.Element, "LowColor", null);
|
2015-02-08 22:51:52 +01:00
|
|
|
|
xmlLowColor.InnerText = m_LowLeds[device].red.ToString() + "," + m_LowLeds[device].green.ToString() + "," + m_LowLeds[device].blue.ToString();
|
2014-06-26 20:02:01 +02:00
|
|
|
|
Node.AppendChild(xmlLowColor);
|
|
|
|
|
XmlNode xmlChargingColor = m_Xdoc.CreateNode(XmlNodeType.Element, "ChargingColor", null);
|
2015-02-08 22:51:52 +01:00
|
|
|
|
xmlChargingColor.InnerText = m_ChargingLeds[device].red.ToString() + "," + m_ChargingLeds[device].green.ToString() + "," + m_ChargingLeds[device].blue.ToString();
|
2014-06-26 20:02:01 +02:00
|
|
|
|
Node.AppendChild(xmlChargingColor);
|
2014-08-23 22:52:20 +02:00
|
|
|
|
XmlNode xmlFlashColor = m_Xdoc.CreateNode(XmlNodeType.Element, "FlashColor", null);
|
2015-02-08 22:51:52 +01:00
|
|
|
|
xmlFlashColor.InnerText = m_FlashLeds[device].red.ToString() + "," + m_FlashLeds[device].green.ToString() + "," + m_FlashLeds[device].blue.ToString();
|
2014-08-23 22:52:20 +02:00
|
|
|
|
Node.AppendChild(xmlFlashColor);
|
2014-04-29 10:22:37 +02:00
|
|
|
|
XmlNode xmlTouchpadJitterCompensation = m_Xdoc.CreateNode(XmlNodeType.Element, "touchpadJitterCompensation", null); xmlTouchpadJitterCompensation.InnerText = touchpadJitterCompensation[device].ToString(); Node.AppendChild(xmlTouchpadJitterCompensation);
|
|
|
|
|
XmlNode xmlLowerRCOn = m_Xdoc.CreateNode(XmlNodeType.Element, "lowerRCOn", null); xmlLowerRCOn.InnerText = lowerRCOn[device].ToString(); Node.AppendChild(xmlLowerRCOn);
|
|
|
|
|
XmlNode xmlTapSensitivity = m_Xdoc.CreateNode(XmlNodeType.Element, "tapSensitivity", null); xmlTapSensitivity.InnerText = tapSensitivity[device].ToString(); Node.AppendChild(xmlTapSensitivity);
|
|
|
|
|
XmlNode xmlDouble = m_Xdoc.CreateNode(XmlNodeType.Element, "doubleTap", null); xmlDouble.InnerText = doubleTap[device].ToString(); Node.AppendChild(xmlDouble);
|
|
|
|
|
XmlNode xmlScrollSensitivity = m_Xdoc.CreateNode(XmlNodeType.Element, "scrollSensitivity", null); xmlScrollSensitivity.InnerText = scrollSensitivity[device].ToString(); Node.AppendChild(xmlScrollSensitivity);
|
2014-12-13 21:12:03 +01:00
|
|
|
|
XmlNode xmlLeftTriggerMiddle = m_Xdoc.CreateNode(XmlNodeType.Element, "LeftTriggerMiddle", null); xmlLeftTriggerMiddle.InnerText = l2Deadzone[device].ToString(); Node.AppendChild(xmlLeftTriggerMiddle);
|
|
|
|
|
XmlNode xmlRightTriggerMiddle = m_Xdoc.CreateNode(XmlNodeType.Element, "RightTriggerMiddle", null); xmlRightTriggerMiddle.InnerText = r2Deadzone[device].ToString(); Node.AppendChild(xmlRightTriggerMiddle);
|
2017-03-30 09:37:01 +02:00
|
|
|
|
XmlNode xmlL2AD = m_Xdoc.CreateNode(XmlNodeType.Element, "L2AntiDeadZone", null); xmlL2AD.InnerText = l2AntiDeadzone[device].ToString(); Node.AppendChild(xmlL2AD);
|
|
|
|
|
XmlNode xmlR2AD = m_Xdoc.CreateNode(XmlNodeType.Element, "R2AntiDeadZone", null); xmlR2AD.InnerText = r2AntiDeadzone[device].ToString(); Node.AppendChild(xmlR2AD);
|
2014-04-29 23:56:58 +02:00
|
|
|
|
XmlNode xmlButtonMouseSensitivity = m_Xdoc.CreateNode(XmlNodeType.Element, "ButtonMouseSensitivity", null); xmlButtonMouseSensitivity.InnerText = buttonMouseSensitivity[device].ToString(); Node.AppendChild(xmlButtonMouseSensitivity);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
XmlNode xmlRainbow = m_Xdoc.CreateNode(XmlNodeType.Element, "Rainbow", null); xmlRainbow.InnerText = rainbow[device].ToString(); Node.AppendChild(xmlRainbow);
|
2014-05-21 23:42:25 +02:00
|
|
|
|
XmlNode xmlLSD = m_Xdoc.CreateNode(XmlNodeType.Element, "LSDeadZone", null); xmlLSD.InnerText = LSDeadzone[device].ToString(); Node.AppendChild(xmlLSD);
|
|
|
|
|
XmlNode xmlRSD = m_Xdoc.CreateNode(XmlNodeType.Element, "RSDeadZone", null); xmlRSD.InnerText = RSDeadzone[device].ToString(); Node.AppendChild(xmlRSD);
|
2017-03-27 11:50:32 +02:00
|
|
|
|
XmlNode xmlLSAD = m_Xdoc.CreateNode(XmlNodeType.Element, "LSAntiDeadZone", null); xmlLSAD.InnerText = LSAntiDeadzone[device].ToString(); Node.AppendChild(xmlLSAD);
|
|
|
|
|
XmlNode xmlRSAD = m_Xdoc.CreateNode(XmlNodeType.Element, "RSAntiDeadZone", null); xmlRSAD.InnerText = RSAntiDeadzone[device].ToString(); Node.AppendChild(xmlRSAD);
|
2014-06-26 20:02:01 +02:00
|
|
|
|
XmlNode xmlSXD = m_Xdoc.CreateNode(XmlNodeType.Element, "SXDeadZone", null); xmlSXD.InnerText = SXDeadzone[device].ToString(); Node.AppendChild(xmlSXD);
|
|
|
|
|
XmlNode xmlSZD = m_Xdoc.CreateNode(XmlNodeType.Element, "SZDeadZone", null); xmlSZD.InnerText = SZDeadzone[device].ToString(); Node.AppendChild(xmlSZD);
|
2015-12-05 09:55:11 +01:00
|
|
|
|
|
|
|
|
|
XmlNode xmlSens = m_Xdoc.CreateNode(XmlNodeType.Element, "Sensitivity", null);
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
xmlSens.InnerText = $"{LSSens[device]}|{RSSens[device]}|{l2Sens[device]}|{r2Sens[device]}|{SXSens[device]}|{SZSens[device]}";
|
2015-12-05 09:55:11 +01:00
|
|
|
|
Node.AppendChild(xmlSens);
|
|
|
|
|
|
2014-06-02 19:29:38 +02:00
|
|
|
|
XmlNode xmlChargingType = m_Xdoc.CreateNode(XmlNodeType.Element, "ChargingType", null); xmlChargingType.InnerText = chargingType[device].ToString(); Node.AppendChild(xmlChargingType);
|
2014-06-26 20:02:01 +02:00
|
|
|
|
XmlNode xmlMouseAccel = m_Xdoc.CreateNode(XmlNodeType.Element, "MouseAcceleration", null); xmlMouseAccel.InnerText = mouseAccel[device].ToString(); Node.AppendChild(xmlMouseAccel);
|
2015-12-18 07:25:51 +01:00
|
|
|
|
//XmlNode xmlShiftMod = m_Xdoc.CreateNode(XmlNodeType.Element, "ShiftModifier", null); xmlShiftMod.InnerText = shiftModifier[device].ToString(); Node.AppendChild(xmlShiftMod);
|
2014-08-23 22:52:20 +02:00
|
|
|
|
XmlNode xmlLaunchProgram = m_Xdoc.CreateNode(XmlNodeType.Element, "LaunchProgram", null); xmlLaunchProgram.InnerText = launchProgram[device].ToString(); Node.AppendChild(xmlLaunchProgram);
|
|
|
|
|
XmlNode xmlDinput = m_Xdoc.CreateNode(XmlNodeType.Element, "DinputOnly", null); xmlDinput.InnerText = dinputOnly[device].ToString(); Node.AppendChild(xmlDinput);
|
2014-09-15 04:37:14 +02:00
|
|
|
|
XmlNode xmlStartTouchpadOff = m_Xdoc.CreateNode(XmlNodeType.Element, "StartTouchpadOff", null); xmlStartTouchpadOff.InnerText = startTouchpadOff[device].ToString(); Node.AppendChild(xmlStartTouchpadOff);
|
2014-11-15 22:54:14 +01:00
|
|
|
|
XmlNode xmlUseTPforControls = m_Xdoc.CreateNode(XmlNodeType.Element, "UseTPforControls", null); xmlUseTPforControls.InnerText = useTPforControls[device].ToString(); Node.AppendChild(xmlUseTPforControls);
|
2015-11-28 06:47:26 +01:00
|
|
|
|
XmlNode xmlUseSAforMouse = m_Xdoc.CreateNode(XmlNodeType.Element, "UseSAforMouse", null); xmlUseSAforMouse.InnerText = useSAforMouse[device].ToString(); Node.AppendChild(xmlUseSAforMouse);
|
|
|
|
|
XmlNode xmlSATriggers = m_Xdoc.CreateNode(XmlNodeType.Element, "SATriggers", null); xmlSATriggers.InnerText = sATriggers[device].ToString(); Node.AppendChild(xmlSATriggers);
|
|
|
|
|
XmlNode xmlGyroSensitivity = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroSensitivity", null); xmlGyroSensitivity.InnerText = gyroSensitivity[device].ToString(); Node.AppendChild(xmlGyroSensitivity);
|
|
|
|
|
XmlNode xmlGyroInvert = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroInvert", null); xmlGyroInvert.InnerText = gyroInvert[device].ToString(); Node.AppendChild(xmlGyroInvert);
|
2014-12-13 21:12:03 +01:00
|
|
|
|
XmlNode xmlLSC = m_Xdoc.CreateNode(XmlNodeType.Element, "LSCurve", null); xmlLSC.InnerText = lsCurve[device].ToString(); Node.AppendChild(xmlLSC);
|
|
|
|
|
XmlNode xmlRSC = m_Xdoc.CreateNode(XmlNodeType.Element, "RSCurve", null); xmlRSC.InnerText = rsCurve[device].ToString(); Node.AppendChild(xmlRSC);
|
|
|
|
|
XmlNode xmlProfileActions = m_Xdoc.CreateNode(XmlNodeType.Element, "ProfileActions", null); xmlProfileActions.InnerText = string.Join("/", profileActions[device]); Node.AppendChild(xmlProfileActions);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
XmlNode NodeControl = m_Xdoc.CreateNode(XmlNodeType.Element, "Control", null);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
XmlNode Key = m_Xdoc.CreateNode(XmlNodeType.Element, "Key", null);
|
2014-05-28 04:49:58 +02:00
|
|
|
|
XmlNode Macro = m_Xdoc.CreateNode(XmlNodeType.Element, "Macro", null);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
XmlNode KeyType = m_Xdoc.CreateNode(XmlNodeType.Element, "KeyType", null);
|
|
|
|
|
XmlNode Button = m_Xdoc.CreateNode(XmlNodeType.Element, "Button", null);
|
2014-12-02 01:07:29 +01:00
|
|
|
|
XmlNode Extras = m_Xdoc.CreateNode(XmlNodeType.Element, "Extras", null);
|
2015-12-18 07:25:51 +01:00
|
|
|
|
|
|
|
|
|
XmlNode NodeShiftControl = m_Xdoc.CreateNode(XmlNodeType.Element, "ShiftControl", null);
|
|
|
|
|
|
|
|
|
|
XmlNode ShiftKey = m_Xdoc.CreateNode(XmlNodeType.Element, "Key", null);
|
|
|
|
|
XmlNode ShiftMacro = m_Xdoc.CreateNode(XmlNodeType.Element, "Macro", null);
|
|
|
|
|
XmlNode ShiftKeyType = m_Xdoc.CreateNode(XmlNodeType.Element, "KeyType", null);
|
|
|
|
|
XmlNode ShiftButton = m_Xdoc.CreateNode(XmlNodeType.Element, "Button", null);
|
|
|
|
|
XmlNode ShiftExtras = m_Xdoc.CreateNode(XmlNodeType.Element, "Extras", null);
|
|
|
|
|
|
|
|
|
|
foreach (DS4ControlSettings dcs in ds4settings[device])
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
{
|
2015-12-18 07:25:51 +01:00
|
|
|
|
if (dcs.action != null)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2015-12-18 07:25:51 +01:00
|
|
|
|
XmlNode buttonNode;
|
|
|
|
|
string keyType = string.Empty;
|
|
|
|
|
|
|
|
|
|
if (dcs.action is string)
|
|
|
|
|
if (dcs.action.ToString() == "Unbound")
|
|
|
|
|
keyType += DS4KeyType.Unbound;
|
|
|
|
|
if (dcs.keyType.HasFlag(DS4KeyType.HoldMacro))
|
|
|
|
|
keyType += DS4KeyType.HoldMacro;
|
2016-10-21 07:43:26 +02:00
|
|
|
|
else if (dcs.keyType.HasFlag(DS4KeyType.Macro))
|
2015-12-18 07:25:51 +01:00
|
|
|
|
keyType += DS4KeyType.Macro;
|
|
|
|
|
if (dcs.keyType.HasFlag(DS4KeyType.Toggle))
|
|
|
|
|
keyType += DS4KeyType.Toggle;
|
|
|
|
|
if (dcs.keyType.HasFlag(DS4KeyType.ScanCode))
|
|
|
|
|
keyType += DS4KeyType.ScanCode;
|
|
|
|
|
if (keyType != string.Empty)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2015-12-18 07:25:51 +01:00
|
|
|
|
buttonNode = m_Xdoc.CreateNode(XmlNodeType.Element, dcs.control.ToString(), null);
|
|
|
|
|
buttonNode.InnerText = keyType;
|
|
|
|
|
KeyType.AppendChild(buttonNode);
|
|
|
|
|
}
|
2014-12-02 01:07:29 +01:00
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
buttonNode = m_Xdoc.CreateNode(XmlNodeType.Element, dcs.control.ToString(), null);
|
|
|
|
|
if (dcs.action is IEnumerable<int> || dcs.action is int[] || dcs.action is ushort[])
|
|
|
|
|
{
|
|
|
|
|
int[] ii = (int[])dcs.action;
|
|
|
|
|
buttonNode.InnerText = string.Join("/", ii);
|
|
|
|
|
Macro.AppendChild(buttonNode);
|
|
|
|
|
}
|
|
|
|
|
else if (dcs.action is int || dcs.action is ushort || dcs.action is byte)
|
|
|
|
|
{
|
|
|
|
|
buttonNode.InnerText = dcs.action.ToString();
|
|
|
|
|
Key.AppendChild(buttonNode);
|
|
|
|
|
}
|
2017-04-11 23:56:37 +02:00
|
|
|
|
else if (dcs.action is string)
|
2015-12-18 07:25:51 +01:00
|
|
|
|
{
|
|
|
|
|
buttonNode.InnerText = dcs.action.ToString();
|
|
|
|
|
Button.AppendChild(buttonNode);
|
|
|
|
|
}
|
2017-04-11 23:56:37 +02:00
|
|
|
|
else if (dcs.action is X360Controls)
|
|
|
|
|
{
|
|
|
|
|
buttonNode.InnerText = getX360ControlString((X360Controls)dcs.action);
|
|
|
|
|
Button.AppendChild(buttonNode);
|
|
|
|
|
}
|
2015-12-18 07:25:51 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool hasvalue = false;
|
|
|
|
|
if (!string.IsNullOrEmpty(dcs.extras))
|
|
|
|
|
foreach (string s in dcs.extras.Split(','))
|
|
|
|
|
if (s != "0")
|
2014-12-02 01:07:29 +01:00
|
|
|
|
{
|
2015-12-18 07:25:51 +01:00
|
|
|
|
hasvalue = true;
|
|
|
|
|
break;
|
2014-12-02 01:07:29 +01:00
|
|
|
|
}
|
2015-12-18 07:25:51 +01:00
|
|
|
|
if (hasvalue)
|
|
|
|
|
{
|
|
|
|
|
XmlNode extraNode = m_Xdoc.CreateNode(XmlNodeType.Element, dcs.control.ToString(), null);
|
|
|
|
|
extraNode.InnerText = dcs.extras;
|
|
|
|
|
Extras.AppendChild(extraNode);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (dcs.shiftAction != null && dcs.shiftTrigger > 0)
|
|
|
|
|
{
|
|
|
|
|
XmlElement buttonNode;
|
|
|
|
|
string keyType = string.Empty;
|
|
|
|
|
|
|
|
|
|
if (dcs.shiftAction is string)
|
|
|
|
|
if (dcs.shiftAction.ToString() == "Unbound")
|
|
|
|
|
keyType += DS4KeyType.Unbound;
|
|
|
|
|
if (dcs.shiftKeyType.HasFlag(DS4KeyType.HoldMacro))
|
|
|
|
|
keyType += DS4KeyType.HoldMacro;
|
|
|
|
|
if (dcs.shiftKeyType.HasFlag(DS4KeyType.Macro))
|
|
|
|
|
keyType += DS4KeyType.Macro;
|
|
|
|
|
if (dcs.shiftKeyType.HasFlag(DS4KeyType.Toggle))
|
|
|
|
|
keyType += DS4KeyType.Toggle;
|
|
|
|
|
if (dcs.shiftKeyType.HasFlag(DS4KeyType.ScanCode))
|
|
|
|
|
keyType += DS4KeyType.ScanCode;
|
|
|
|
|
if (keyType != string.Empty)
|
|
|
|
|
{
|
|
|
|
|
buttonNode = m_Xdoc.CreateElement(dcs.control.ToString());
|
|
|
|
|
buttonNode.InnerText = keyType;
|
|
|
|
|
ShiftKeyType.AppendChild(buttonNode);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buttonNode = m_Xdoc.CreateElement(dcs.control.ToString());
|
|
|
|
|
buttonNode.SetAttribute("Trigger", dcs.shiftTrigger.ToString());
|
|
|
|
|
if (dcs.shiftAction is IEnumerable<int> || dcs.shiftAction is int[] || dcs.shiftAction is ushort[])
|
|
|
|
|
{
|
|
|
|
|
int[] ii = (int[])dcs.shiftAction;
|
|
|
|
|
buttonNode.InnerText = string.Join("/", ii);
|
|
|
|
|
ShiftMacro.AppendChild(buttonNode);
|
|
|
|
|
}
|
|
|
|
|
else if (dcs.shiftAction is int || dcs.shiftAction is ushort || dcs.shiftAction is byte)
|
|
|
|
|
{
|
|
|
|
|
buttonNode.InnerText = dcs.shiftAction.ToString();
|
|
|
|
|
ShiftKey.AppendChild(buttonNode);
|
|
|
|
|
}
|
|
|
|
|
else if (dcs.shiftAction is string || dcs.shiftAction is X360Controls)
|
|
|
|
|
{
|
|
|
|
|
buttonNode.InnerText = dcs.shiftAction.ToString();
|
|
|
|
|
ShiftButton.AppendChild(buttonNode);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
hasvalue = false;
|
|
|
|
|
if (!string.IsNullOrEmpty(dcs.shiftExtras))
|
|
|
|
|
foreach (string s in dcs.shiftExtras.Split(','))
|
|
|
|
|
if (s != "0")
|
2014-12-02 01:07:29 +01:00
|
|
|
|
{
|
2015-12-18 07:25:51 +01:00
|
|
|
|
hasvalue = true;
|
|
|
|
|
break;
|
2014-12-02 01:07:29 +01:00
|
|
|
|
}
|
2015-12-18 07:25:51 +01:00
|
|
|
|
if (hasvalue)
|
|
|
|
|
{
|
|
|
|
|
XmlNode extraNode = m_Xdoc.CreateNode(XmlNodeType.Element, dcs.control.ToString(), null);
|
|
|
|
|
extraNode.InnerText = dcs.shiftExtras;
|
|
|
|
|
ShiftExtras.AppendChild(extraNode);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
}
|
2015-12-18 07:25:51 +01:00
|
|
|
|
Node.AppendChild(NodeControl);
|
|
|
|
|
if (Button.HasChildNodes)
|
|
|
|
|
NodeControl.AppendChild(Button);
|
|
|
|
|
if (Macro.HasChildNodes)
|
|
|
|
|
NodeControl.AppendChild(Macro);
|
|
|
|
|
if (Key.HasChildNodes)
|
|
|
|
|
NodeControl.AppendChild(Key);
|
|
|
|
|
if (Extras.HasChildNodes)
|
|
|
|
|
NodeControl.AppendChild(Extras);
|
|
|
|
|
if (KeyType.HasChildNodes)
|
|
|
|
|
NodeControl.AppendChild(KeyType);
|
|
|
|
|
if (NodeControl.HasChildNodes)
|
|
|
|
|
Node.AppendChild(NodeControl);
|
|
|
|
|
|
|
|
|
|
Node.AppendChild(NodeShiftControl);
|
|
|
|
|
if (ShiftButton.HasChildNodes)
|
|
|
|
|
NodeShiftControl.AppendChild(ShiftButton);
|
|
|
|
|
if (ShiftMacro.HasChildNodes)
|
|
|
|
|
NodeShiftControl.AppendChild(ShiftMacro);
|
|
|
|
|
if (ShiftKey.HasChildNodes)
|
|
|
|
|
NodeShiftControl.AppendChild(ShiftKey);
|
|
|
|
|
if (ShiftKeyType.HasChildNodes)
|
|
|
|
|
NodeShiftControl.AppendChild(ShiftKeyType);
|
|
|
|
|
if (ShiftExtras.HasChildNodes)
|
|
|
|
|
NodeShiftControl.AppendChild(ShiftExtras);
|
|
|
|
|
/*else if (xmlControls != null)
|
|
|
|
|
{
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
Node.AppendChild(xmlControls);
|
2015-12-18 07:25:51 +01:00
|
|
|
|
}*/
|
|
|
|
|
/*if (shiftModifier[device] > 0)
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
{
|
|
|
|
|
XmlNode NodeShiftControl = m_Xdoc.CreateNode(XmlNodeType.Element, "ShiftControl", null);
|
|
|
|
|
|
|
|
|
|
XmlNode ShiftKey = m_Xdoc.CreateNode(XmlNodeType.Element, "Key", null);
|
|
|
|
|
XmlNode ShiftMacro = m_Xdoc.CreateNode(XmlNodeType.Element, "Macro", null);
|
|
|
|
|
XmlNode ShiftKeyType = m_Xdoc.CreateNode(XmlNodeType.Element, "KeyType", null);
|
|
|
|
|
XmlNode ShiftButton = m_Xdoc.CreateNode(XmlNodeType.Element, "Button", null);
|
2014-12-02 01:07:29 +01:00
|
|
|
|
XmlNode ShiftExtras = m_Xdoc.CreateNode(XmlNodeType.Element, "Extras", null);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (shiftbuttons != null)
|
|
|
|
|
{
|
|
|
|
|
foreach (var button in shiftbuttons)
|
|
|
|
|
{
|
|
|
|
|
// Save even if string (for xbox controller buttons)
|
|
|
|
|
if (button.Tag != null)
|
|
|
|
|
{
|
|
|
|
|
XmlNode buttonNode;
|
|
|
|
|
string keyType = String.Empty;
|
2014-12-02 01:07:29 +01:00
|
|
|
|
if (button.Tag is KeyValuePair<string, string>)
|
|
|
|
|
if (((KeyValuePair<string, string>)button.Tag).Key == "Unbound")
|
|
|
|
|
keyType += DS4KeyType.Unbound;
|
|
|
|
|
|
|
|
|
|
if (button.Font.Strikeout)
|
|
|
|
|
keyType += DS4KeyType.HoldMacro;
|
|
|
|
|
if (button.Font.Underline)
|
|
|
|
|
keyType += DS4KeyType.Macro;
|
|
|
|
|
if (button.Font.Italic)
|
|
|
|
|
keyType += DS4KeyType.Toggle;
|
|
|
|
|
if (button.Font.Bold)
|
|
|
|
|
keyType += DS4KeyType.ScanCode;
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (keyType != String.Empty)
|
|
|
|
|
{
|
|
|
|
|
buttonNode = m_Xdoc.CreateNode(XmlNodeType.Element, button.Name, null);
|
|
|
|
|
buttonNode.InnerText = keyType;
|
|
|
|
|
ShiftKeyType.AppendChild(buttonNode);
|
|
|
|
|
}
|
2014-12-02 01:07:29 +01:00
|
|
|
|
|
|
|
|
|
string[] extras;
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
buttonNode = m_Xdoc.CreateNode(XmlNodeType.Element, button.Name, null);
|
2014-12-02 01:07:29 +01:00
|
|
|
|
if (button.Tag is KeyValuePair<IEnumerable<int>, string> || button.Tag is KeyValuePair<Int32[], string> || button.Tag is KeyValuePair<UInt16[], string>)
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
{
|
2014-12-02 01:07:29 +01:00
|
|
|
|
KeyValuePair<Int32[], string> tag = (KeyValuePair<Int32[], string>)button.Tag;
|
|
|
|
|
int[] ii = tag.Key;
|
|
|
|
|
buttonNode.InnerText = string.Join("/", ii);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
ShiftMacro.AppendChild(buttonNode);
|
2014-12-02 01:07:29 +01:00
|
|
|
|
extras = tag.Value.Split(',');
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
}
|
2014-12-02 01:07:29 +01:00
|
|
|
|
else if (button.Tag is KeyValuePair<Int32, string> || button.Tag is KeyValuePair<UInt16, string> || button.Tag is KeyValuePair<byte, string>)
|
|
|
|
|
{
|
|
|
|
|
KeyValuePair<int, string> tag = (KeyValuePair<int, string>)button.Tag;
|
|
|
|
|
buttonNode.InnerText = tag.Key.ToString();
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
ShiftKey.AppendChild(buttonNode);
|
2014-12-02 01:07:29 +01:00
|
|
|
|
extras = tag.Value.Split(',');
|
|
|
|
|
}
|
|
|
|
|
else if (button.Tag is KeyValuePair<string, string>)
|
|
|
|
|
{
|
|
|
|
|
KeyValuePair<string, string> tag = (KeyValuePair<string, string>)button.Tag;
|
|
|
|
|
buttonNode.InnerText = tag.Key;
|
|
|
|
|
ShiftButton.AppendChild(buttonNode);
|
|
|
|
|
extras = tag.Value.Split(',');
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
KeyValuePair<object, string> tag = (KeyValuePair<object, string>)button.Tag;
|
|
|
|
|
extras = tag.Value.Split(',');
|
|
|
|
|
}
|
|
|
|
|
bool hasvalue = false;
|
|
|
|
|
foreach (string s in extras)
|
|
|
|
|
if (s != "0")
|
|
|
|
|
{
|
|
|
|
|
hasvalue = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2014-12-17 19:29:22 +01:00
|
|
|
|
if (hasvalue && !string.IsNullOrEmpty(String.Join(",", extras)))
|
2014-12-02 01:07:29 +01:00
|
|
|
|
{
|
|
|
|
|
XmlNode extraNode = m_Xdoc.CreateNode(XmlNodeType.Element, button.Name, null);
|
|
|
|
|
extraNode.InnerText = String.Join(",", extras);
|
|
|
|
|
ShiftExtras.AppendChild(extraNode);
|
|
|
|
|
}
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Node.AppendChild(NodeShiftControl);
|
|
|
|
|
if (ShiftButton.HasChildNodes)
|
|
|
|
|
NodeShiftControl.AppendChild(ShiftButton);
|
|
|
|
|
if (ShiftMacro.HasChildNodes)
|
|
|
|
|
NodeShiftControl.AppendChild(ShiftMacro);
|
|
|
|
|
if (ShiftKey.HasChildNodes)
|
|
|
|
|
NodeShiftControl.AppendChild(ShiftKey);
|
|
|
|
|
if (ShiftKeyType.HasChildNodes)
|
|
|
|
|
NodeShiftControl.AppendChild(ShiftKeyType);
|
|
|
|
|
}
|
|
|
|
|
else if (xmlShiftControls != null)
|
|
|
|
|
Node.AppendChild(xmlShiftControls);
|
2015-12-18 07:25:51 +01:00
|
|
|
|
}*/
|
2014-04-27 21:32:09 +02:00
|
|
|
|
m_Xdoc.AppendChild(Node);
|
|
|
|
|
m_Xdoc.Save(path);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2014-04-27 21:32:09 +02:00
|
|
|
|
catch { Saved = false; }
|
2014-03-28 02:50:40 +01:00
|
|
|
|
return Saved;
|
|
|
|
|
}
|
2015-12-18 07:25:51 +01:00
|
|
|
|
|
2017-04-11 22:57:39 +02:00
|
|
|
|
public DS4Controls getDS4ControlsByName(string key)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2015-12-18 07:25:51 +01:00
|
|
|
|
|
|
|
|
|
if (!key.StartsWith("bn"))
|
|
|
|
|
return (DS4Controls)Enum.Parse(typeof(DS4Controls), key, true);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
switch (key)
|
|
|
|
|
{
|
|
|
|
|
case "bnShare": return DS4Controls.Share;
|
|
|
|
|
case "bnL3": return DS4Controls.L3;
|
|
|
|
|
case "bnR3": return DS4Controls.R3;
|
|
|
|
|
case "bnOptions": return DS4Controls.Options;
|
|
|
|
|
case "bnUp": return DS4Controls.DpadUp;
|
|
|
|
|
case "bnRight": return DS4Controls.DpadRight;
|
|
|
|
|
case "bnDown": return DS4Controls.DpadDown;
|
|
|
|
|
case "bnLeft": return DS4Controls.DpadLeft;
|
|
|
|
|
|
|
|
|
|
case "bnL1": return DS4Controls.L1;
|
|
|
|
|
case "bnR1": return DS4Controls.R1;
|
|
|
|
|
case "bnTriangle": return DS4Controls.Triangle;
|
|
|
|
|
case "bnCircle": return DS4Controls.Circle;
|
|
|
|
|
case "bnCross": return DS4Controls.Cross;
|
|
|
|
|
case "bnSquare": return DS4Controls.Square;
|
|
|
|
|
|
|
|
|
|
case "bnPS": return DS4Controls.PS;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
case "bnLSLeft": return DS4Controls.LXNeg;
|
|
|
|
|
case "bnLSUp": return DS4Controls.LYNeg;
|
|
|
|
|
case "bnRSLeft": return DS4Controls.RXNeg;
|
|
|
|
|
case "bnRSUp": return DS4Controls.RYNeg;
|
|
|
|
|
|
|
|
|
|
case "bnLSRight": return DS4Controls.LXPos;
|
|
|
|
|
case "bnLSDown": return DS4Controls.LYPos;
|
|
|
|
|
case "bnRSRight": return DS4Controls.RXPos;
|
|
|
|
|
case "bnRSDown": return DS4Controls.RYPos;
|
2014-03-28 02:50:40 +01:00
|
|
|
|
case "bnL2": return DS4Controls.L2;
|
|
|
|
|
case "bnR2": return DS4Controls.R2;
|
|
|
|
|
|
2014-04-27 21:32:09 +02:00
|
|
|
|
case "bnTouchLeft": return DS4Controls.TouchLeft;
|
2014-03-28 02:50:40 +01:00
|
|
|
|
case "bnTouchMulti": return DS4Controls.TouchMulti;
|
|
|
|
|
case "bnTouchUpper": return DS4Controls.TouchUpper;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
case "bnTouchRight": return DS4Controls.TouchRight;
|
2014-06-24 00:27:14 +02:00
|
|
|
|
case "bnGyroXP": return DS4Controls.GyroXPos;
|
|
|
|
|
case "bnGyroXN": return DS4Controls.GyroXNeg;
|
|
|
|
|
case "bnGyroZP": return DS4Controls.GyroZPos;
|
|
|
|
|
case "bnGyroZN": return DS4Controls.GyroZNeg;
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
|
2014-12-13 21:12:03 +01:00
|
|
|
|
case "bnSwipeUp": return DS4Controls.SwipeUp;
|
|
|
|
|
case "bnSwipeDown": return DS4Controls.SwipeDown;
|
|
|
|
|
case "bnSwipeLeft": return DS4Controls.SwipeLeft;
|
|
|
|
|
case "bnSwipeRight": return DS4Controls.SwipeRight;
|
2014-11-18 22:23:41 +01:00
|
|
|
|
|
|
|
|
|
#region OldShiftname
|
|
|
|
|
case "sbnShare": return DS4Controls.Share;
|
|
|
|
|
case "sbnL3": return DS4Controls.L3;
|
|
|
|
|
case "sbnR3": return DS4Controls.R3;
|
|
|
|
|
case "sbnOptions": return DS4Controls.Options;
|
|
|
|
|
case "sbnUp": return DS4Controls.DpadUp;
|
|
|
|
|
case "sbnRight": return DS4Controls.DpadRight;
|
|
|
|
|
case "sbnDown": return DS4Controls.DpadDown;
|
|
|
|
|
case "sbnLeft": return DS4Controls.DpadLeft;
|
|
|
|
|
|
|
|
|
|
case "sbnL1": return DS4Controls.L1;
|
|
|
|
|
case "sbnR1": return DS4Controls.R1;
|
|
|
|
|
case "sbnTriangle": return DS4Controls.Triangle;
|
|
|
|
|
case "sbnCircle": return DS4Controls.Circle;
|
|
|
|
|
case "sbnCross": return DS4Controls.Cross;
|
|
|
|
|
case "sbnSquare": return DS4Controls.Square;
|
|
|
|
|
|
|
|
|
|
case "sbnPS": return DS4Controls.PS;
|
|
|
|
|
case "sbnLSLeft": return DS4Controls.LXNeg;
|
|
|
|
|
case "sbnLSUp": return DS4Controls.LYNeg;
|
|
|
|
|
case "sbnRSLeft": return DS4Controls.RXNeg;
|
|
|
|
|
case "sbnRSUp": return DS4Controls.RYNeg;
|
|
|
|
|
|
|
|
|
|
case "sbnLSRight": return DS4Controls.LXPos;
|
|
|
|
|
case "sbnLSDown": return DS4Controls.LYPos;
|
|
|
|
|
case "sbnRSRight": return DS4Controls.RXPos;
|
|
|
|
|
case "sbnRSDown": return DS4Controls.RYPos;
|
|
|
|
|
case "sbnL2": return DS4Controls.L2;
|
|
|
|
|
case "sbnR2": return DS4Controls.R2;
|
|
|
|
|
|
|
|
|
|
case "sbnTouchLeft": return DS4Controls.TouchLeft;
|
|
|
|
|
case "sbnTouchMulti": return DS4Controls.TouchMulti;
|
|
|
|
|
case "sbnTouchUpper": return DS4Controls.TouchUpper;
|
|
|
|
|
case "sbnTouchRight": return DS4Controls.TouchRight;
|
|
|
|
|
case "sbnGsyroXP": return DS4Controls.GyroXPos;
|
|
|
|
|
case "sbnGyroXN": return DS4Controls.GyroXNeg;
|
|
|
|
|
case "sbnGyroZP": return DS4Controls.GyroZPos;
|
|
|
|
|
case "sbnGyroZN": return DS4Controls.GyroZNeg;
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
#endregion
|
2014-11-18 22:23:41 +01:00
|
|
|
|
|
2014-11-01 22:49:22 +01:00
|
|
|
|
case "bnShiftShare": return DS4Controls.Share;
|
|
|
|
|
case "bnShiftL3": return DS4Controls.L3;
|
|
|
|
|
case "bnShiftR3": return DS4Controls.R3;
|
|
|
|
|
case "bnShiftOptions": return DS4Controls.Options;
|
|
|
|
|
case "bnShiftUp": return DS4Controls.DpadUp;
|
|
|
|
|
case "bnShiftRight": return DS4Controls.DpadRight;
|
|
|
|
|
case "bnShiftDown": return DS4Controls.DpadDown;
|
|
|
|
|
case "bnShiftLeft": return DS4Controls.DpadLeft;
|
|
|
|
|
|
|
|
|
|
case "bnShiftL1": return DS4Controls.L1;
|
|
|
|
|
case "bnShiftR1": return DS4Controls.R1;
|
|
|
|
|
case "bnShiftTriangle": return DS4Controls.Triangle;
|
|
|
|
|
case "bnShiftCircle": return DS4Controls.Circle;
|
|
|
|
|
case "bnShiftCross": return DS4Controls.Cross;
|
|
|
|
|
case "bnShiftSquare": return DS4Controls.Square;
|
|
|
|
|
|
|
|
|
|
case "bnShiftPS": return DS4Controls.PS;
|
|
|
|
|
case "bnShiftLSLeft": return DS4Controls.LXNeg;
|
|
|
|
|
case "bnShiftLSUp": return DS4Controls.LYNeg;
|
|
|
|
|
case "bnShiftRSLeft": return DS4Controls.RXNeg;
|
|
|
|
|
case "bnShiftRSUp": return DS4Controls.RYNeg;
|
|
|
|
|
|
|
|
|
|
case "bnShiftLSRight": return DS4Controls.LXPos;
|
|
|
|
|
case "bnShiftLSDown": return DS4Controls.LYPos;
|
|
|
|
|
case "bnShiftRSRight": return DS4Controls.RXPos;
|
|
|
|
|
case "bnShiftRSDown": return DS4Controls.RYPos;
|
|
|
|
|
case "bnShiftL2": return DS4Controls.L2;
|
|
|
|
|
case "bnShiftR2": return DS4Controls.R2;
|
|
|
|
|
|
|
|
|
|
case "bnShiftTouchLeft": return DS4Controls.TouchLeft;
|
|
|
|
|
case "bnShiftTouchMulti": return DS4Controls.TouchMulti;
|
|
|
|
|
case "bnShiftTouchUpper": return DS4Controls.TouchUpper;
|
|
|
|
|
case "bnShiftTouchRight": return DS4Controls.TouchRight;
|
2014-11-18 22:23:41 +01:00
|
|
|
|
case "bnShiftGyroXP": return DS4Controls.GyroXPos;
|
2014-11-01 22:49:22 +01:00
|
|
|
|
case "bnShiftGyroXN": return DS4Controls.GyroXNeg;
|
|
|
|
|
case "bnShiftGyroZP": return DS4Controls.GyroZPos;
|
|
|
|
|
case "bnShiftGyroZN": return DS4Controls.GyroZNeg;
|
|
|
|
|
|
2014-11-15 22:54:14 +01:00
|
|
|
|
case "bnShiftSwipeUp": return DS4Controls.SwipeUp;
|
|
|
|
|
case "bnShiftSwipeDown": return DS4Controls.SwipeDown;
|
|
|
|
|
case "bnShiftSwipeLeft": return DS4Controls.SwipeLeft;
|
|
|
|
|
case "bnShiftSwipeRight": return DS4Controls.SwipeRight;
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
|
2017-04-11 22:57:39 +02:00
|
|
|
|
public X360Controls getX360ControlsByName(string key)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2015-12-18 07:25:51 +01:00
|
|
|
|
X360Controls x3c;
|
|
|
|
|
if (Enum.TryParse(key, true, out x3c))
|
|
|
|
|
return x3c;
|
2014-03-28 02:50:40 +01:00
|
|
|
|
switch (key)
|
|
|
|
|
{
|
|
|
|
|
case "Back": return X360Controls.Back;
|
|
|
|
|
case "Left Stick": return X360Controls.LS;
|
|
|
|
|
case "Right Stick": return X360Controls.RS;
|
|
|
|
|
case "Start": return X360Controls.Start;
|
|
|
|
|
case "Up Button": return X360Controls.DpadUp;
|
|
|
|
|
case "Right Button": return X360Controls.DpadRight;
|
|
|
|
|
case "Down Button": return X360Controls.DpadDown;
|
|
|
|
|
case "Left Button": return X360Controls.DpadLeft;
|
|
|
|
|
|
|
|
|
|
case "Left Bumper": return X360Controls.LB;
|
|
|
|
|
case "Right Bumper": return X360Controls.RB;
|
|
|
|
|
case "Y Button": return X360Controls.Y;
|
|
|
|
|
case "B Button": return X360Controls.B;
|
|
|
|
|
case "A Button": return X360Controls.A;
|
|
|
|
|
case "X Button": return X360Controls.X;
|
|
|
|
|
|
|
|
|
|
case "Guide": return X360Controls.Guide;
|
|
|
|
|
case "Left X-Axis-": return X360Controls.LXNeg;
|
|
|
|
|
case "Left Y-Axis-": return X360Controls.LYNeg;
|
|
|
|
|
case "Right X-Axis-": return X360Controls.RXNeg;
|
|
|
|
|
case "Right Y-Axis-": return X360Controls.RYNeg;
|
|
|
|
|
|
|
|
|
|
case "Left X-Axis+": return X360Controls.LXPos;
|
|
|
|
|
case "Left Y-Axis+": return X360Controls.LYPos;
|
|
|
|
|
case "Right X-Axis+": return X360Controls.RXPos;
|
|
|
|
|
case "Right Y-Axis+": return X360Controls.RYPos;
|
|
|
|
|
case "Left Trigger": return X360Controls.LT;
|
|
|
|
|
case "Right Trigger": return X360Controls.RT;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
|
|
|
|
|
case "Left Mouse Button": return X360Controls.LeftMouse;
|
|
|
|
|
case "Right Mouse Button": return X360Controls.RightMouse;
|
|
|
|
|
case "Middle Mouse Button": return X360Controls.MiddleMouse;
|
|
|
|
|
case "4th Mouse Button": return X360Controls.FourthMouse;
|
|
|
|
|
case "5th Mouse Button": return X360Controls.FifthMouse;
|
|
|
|
|
case "Mouse Wheel Up": return X360Controls.WUP;
|
|
|
|
|
case "Mouse Wheel Down": return X360Controls.WDOWN;
|
2014-04-29 23:56:58 +02:00
|
|
|
|
case "Mouse Up": return X360Controls.MouseUp;
|
|
|
|
|
case "Mouse Down": return X360Controls.MouseDown;
|
|
|
|
|
case "Mouse Left": return X360Controls.MouseLeft;
|
|
|
|
|
case "Mouse Right": return X360Controls.MouseRight;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
case "Unbound": return X360Controls.Unbound;
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return X360Controls.Unbound;
|
|
|
|
|
}
|
2014-06-26 20:02:01 +02:00
|
|
|
|
|
2017-04-11 22:57:39 +02:00
|
|
|
|
public string getX360ControlString(X360Controls key)
|
|
|
|
|
{
|
|
|
|
|
switch (key)
|
|
|
|
|
{
|
|
|
|
|
case X360Controls.Back: return "Back";
|
|
|
|
|
case X360Controls.LS: return "Left Stick";
|
|
|
|
|
case X360Controls.RS: return "Right Stick";
|
|
|
|
|
case X360Controls.Start: return "Start";
|
|
|
|
|
case X360Controls.DpadUp: return "Up Button";
|
|
|
|
|
case X360Controls.DpadRight: return "Right Button";
|
|
|
|
|
case X360Controls.DpadDown: return "Down Button";
|
|
|
|
|
case X360Controls.DpadLeft: return "Left Button";
|
|
|
|
|
|
|
|
|
|
case X360Controls.LB: return "Left Bumper";
|
|
|
|
|
case X360Controls.RB: return "Right Bumper";
|
|
|
|
|
case X360Controls.Y: return "Y Button";
|
|
|
|
|
case X360Controls.B: return "B Button";
|
|
|
|
|
case X360Controls.A: return "A Button";
|
|
|
|
|
case X360Controls.X: return "X Button";
|
|
|
|
|
|
|
|
|
|
case X360Controls.Guide: return "Guide";
|
|
|
|
|
case X360Controls.LXNeg: return "Left X-Axis-";
|
|
|
|
|
case X360Controls.LYNeg: return "Left Y-Axis-";
|
|
|
|
|
case X360Controls.RXNeg: return "Right X-Axis-";
|
|
|
|
|
case X360Controls.RYNeg: return "Right Y-Axis-";
|
|
|
|
|
|
|
|
|
|
case X360Controls.LXPos: return "Left X-Axis+";
|
|
|
|
|
case X360Controls.LYPos: return "Left Y-Axis+";
|
|
|
|
|
case X360Controls.RXPos: return "Right X-Axis+";
|
|
|
|
|
case X360Controls.RYPos: return "Right Y-Axis+";
|
|
|
|
|
case X360Controls.LT: return "Left Trigger";
|
|
|
|
|
case X360Controls.RT: return "Right Trigger";
|
|
|
|
|
|
|
|
|
|
case X360Controls.LeftMouse: return "Left Mouse Button";
|
|
|
|
|
case X360Controls.RightMouse: return "Right Mouse Button";
|
|
|
|
|
case X360Controls.MiddleMouse: return "Middle Mouse Button";
|
|
|
|
|
case X360Controls.FourthMouse: return "4th Mouse Button";
|
|
|
|
|
case X360Controls.FifthMouse: return "5th Mouse Button";
|
|
|
|
|
case X360Controls.WUP: return "Mouse Wheel Up";
|
|
|
|
|
case X360Controls.WDOWN: return "Mouse Wheel Down";
|
|
|
|
|
case X360Controls.MouseUp: return "Mouse Up";
|
|
|
|
|
case X360Controls.MouseDown: return "Mouse Down";
|
|
|
|
|
case X360Controls.MouseLeft: return "Mouse Left";
|
|
|
|
|
case X360Controls.MouseRight: return "Mouse Right";
|
|
|
|
|
case X360Controls.Unbound: return "Unbound";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return "Unbound";
|
|
|
|
|
}
|
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
public Boolean LoadProfile(int device, bool launchprogram, ControlService control, string propath = "")
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
|
|
|
|
Boolean Loaded = true;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
Dictionary<DS4Controls, DS4KeyType> customMapKeyTypes = new Dictionary<DS4Controls, DS4KeyType>();
|
|
|
|
|
Dictionary<DS4Controls, UInt16> customMapKeys = new Dictionary<DS4Controls, UInt16>();
|
|
|
|
|
Dictionary<DS4Controls, X360Controls> customMapButtons = new Dictionary<DS4Controls, X360Controls>();
|
2014-05-28 04:49:58 +02:00
|
|
|
|
Dictionary<DS4Controls, String> customMapMacros = new Dictionary<DS4Controls, String>();
|
2014-12-02 01:07:29 +01:00
|
|
|
|
Dictionary<DS4Controls, String> customMapExtras = new Dictionary<DS4Controls, String>();
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
Dictionary<DS4Controls, DS4KeyType> shiftCustomMapKeyTypes = new Dictionary<DS4Controls, DS4KeyType>();
|
|
|
|
|
Dictionary<DS4Controls, UInt16> shiftCustomMapKeys = new Dictionary<DS4Controls, UInt16>();
|
|
|
|
|
Dictionary<DS4Controls, X360Controls> shiftCustomMapButtons = new Dictionary<DS4Controls, X360Controls>();
|
|
|
|
|
Dictionary<DS4Controls, String> shiftCustomMapMacros = new Dictionary<DS4Controls, String>();
|
2014-12-02 01:07:29 +01:00
|
|
|
|
Dictionary<DS4Controls, String> shiftCustomMapExtras = new Dictionary<DS4Controls, String>();
|
2014-11-18 22:23:41 +01:00
|
|
|
|
string rootname = "DS4Windows";
|
2014-03-28 02:50:40 +01:00
|
|
|
|
Boolean missingSetting = false;
|
2014-06-26 20:02:01 +02:00
|
|
|
|
string profilepath;
|
|
|
|
|
if (propath == "")
|
2015-02-08 22:51:52 +01:00
|
|
|
|
profilepath = Global.appdatapath + @"\Profiles\" + profilePath[device] + ".xml";
|
2014-06-26 20:02:01 +02:00
|
|
|
|
else
|
|
|
|
|
profilepath = propath;
|
2014-07-03 04:33:05 +02:00
|
|
|
|
if (File.Exists(profilepath))
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2014-07-03 04:33:05 +02:00
|
|
|
|
XmlNode Item;
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
2014-07-03 04:33:05 +02:00
|
|
|
|
m_Xdoc.Load(profilepath);
|
2014-11-18 22:23:41 +01:00
|
|
|
|
if (m_Xdoc.SelectSingleNode(rootname) == null)
|
|
|
|
|
{
|
|
|
|
|
rootname = "ScpControl";
|
|
|
|
|
missingSetting = true;
|
|
|
|
|
}
|
2015-03-15 19:16:01 +01:00
|
|
|
|
if (device < 4)
|
|
|
|
|
{
|
|
|
|
|
DS4LightBar.forcelight[device] = false;
|
|
|
|
|
DS4LightBar.forcedFlash[device] = 0;
|
|
|
|
|
}
|
2015-12-05 09:55:11 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/flushHIDQueue"); Boolean.TryParse(Item.InnerText, out flushHIDQueue[device]); }
|
2014-11-18 22:23:41 +01:00
|
|
|
|
catch { missingSetting = true; }//rootname = }
|
2014-04-27 21:32:09 +02:00
|
|
|
|
|
2017-04-26 23:51:15 +02:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/touchToggle"); Boolean.TryParse(Item.InnerText, out enableTouchToggle[device]); }
|
2017-04-26 21:43:01 +02:00
|
|
|
|
catch { missingSetting = true; }
|
|
|
|
|
|
2014-11-18 22:23:41 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/idleDisconnectTimeout"); Int32.TryParse(Item.InnerText, out idleDisconnectTimeout[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
|
|
|
|
//New method for saving color
|
|
|
|
|
try
|
|
|
|
|
{
|
2014-11-18 22:23:41 +01:00
|
|
|
|
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/Color");
|
2014-07-03 04:33:05 +02:00
|
|
|
|
string[] colors;
|
|
|
|
|
if (!string.IsNullOrEmpty(Item.InnerText))
|
|
|
|
|
colors = Item.InnerText.Split(',');
|
|
|
|
|
else
|
|
|
|
|
colors = new string[0];
|
2015-02-08 22:51:52 +01:00
|
|
|
|
m_Leds[device].red = byte.Parse(colors[0]);
|
|
|
|
|
m_Leds[device].green = byte.Parse(colors[1]);
|
|
|
|
|
m_Leds[device].blue = byte.Parse(colors[2]);
|
2014-07-03 04:33:05 +02:00
|
|
|
|
}
|
|
|
|
|
catch { missingSetting = true; }
|
2014-11-18 22:23:41 +01:00
|
|
|
|
if (m_Xdoc.SelectSingleNode("/" + rootname + "/Color") == null)
|
2014-07-03 04:33:05 +02:00
|
|
|
|
{
|
|
|
|
|
//Old method of color saving
|
2015-02-08 22:51:52 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/Red"); Byte.TryParse(Item.InnerText, out m_Leds[device].red); }
|
2014-04-27 21:32:09 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-02-08 22:51:52 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/Green"); Byte.TryParse(Item.InnerText, out m_Leds[device].green); }
|
2014-04-27 21:32:09 +02:00
|
|
|
|
catch { missingSetting = true; }
|
|
|
|
|
|
2015-02-08 22:51:52 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/Blue"); Byte.TryParse(Item.InnerText, out m_Leds[device].blue); }
|
2014-04-27 21:32:09 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
}
|
2014-12-13 21:12:03 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/RumbleBoost"); Byte.TryParse(Item.InnerText, out rumble[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2014-04-27 21:32:09 +02:00
|
|
|
|
|
2014-11-18 22:23:41 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/ledAsBatteryIndicator"); Boolean.TryParse(Item.InnerText, out ledAsBattery[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2014-04-27 21:32:09 +02:00
|
|
|
|
|
2015-02-08 22:51:52 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/FlashType"); Byte.TryParse(Item.InnerText, out flashType[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2014-04-27 21:32:09 +02:00
|
|
|
|
|
2014-11-18 22:23:41 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/flashBatteryAt"); Int32.TryParse(Item.InnerText, out flashAt[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2014-05-31 06:37:02 +02:00
|
|
|
|
|
2014-11-18 22:23:41 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/touchSensitivity"); Byte.TryParse(Item.InnerText, out touchSensitivity[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
|
|
|
|
//New method for saving color
|
|
|
|
|
try
|
|
|
|
|
{
|
2014-11-18 22:23:41 +01:00
|
|
|
|
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LowColor");
|
2014-07-03 04:33:05 +02:00
|
|
|
|
string[] colors;
|
|
|
|
|
if (!string.IsNullOrEmpty(Item.InnerText))
|
|
|
|
|
colors = Item.InnerText.Split(',');
|
|
|
|
|
else
|
|
|
|
|
colors = new string[0];
|
2015-02-08 22:51:52 +01:00
|
|
|
|
m_LowLeds[device].red = byte.Parse(colors[0]);
|
|
|
|
|
m_LowLeds[device].green = byte.Parse(colors[1]);
|
|
|
|
|
m_LowLeds[device].blue = byte.Parse(colors[2]);
|
2014-07-03 04:33:05 +02:00
|
|
|
|
}
|
|
|
|
|
catch { missingSetting = true; }
|
2014-11-18 22:23:41 +01:00
|
|
|
|
if (m_Xdoc.SelectSingleNode("/" + rootname + "/LowColor") == null)
|
2014-07-03 04:33:05 +02:00
|
|
|
|
{
|
|
|
|
|
//Old method of color saving
|
2015-02-08 22:51:52 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LowRed"); Byte.TryParse(Item.InnerText, out m_LowLeds[device].red); }
|
2014-05-21 23:42:25 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-02-08 22:51:52 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LowGreen"); Byte.TryParse(Item.InnerText, out m_LowLeds[device].green); }
|
2014-05-21 23:42:25 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-02-08 22:51:52 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LowBlue"); Byte.TryParse(Item.InnerText, out m_LowLeds[device].blue); }
|
2014-06-26 20:02:01 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
}
|
|
|
|
|
//New method for saving color
|
|
|
|
|
try
|
|
|
|
|
{
|
2014-11-18 22:23:41 +01:00
|
|
|
|
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/ChargingColor");
|
2014-07-03 04:33:05 +02:00
|
|
|
|
string[] colors;
|
|
|
|
|
if (!string.IsNullOrEmpty(Item.InnerText))
|
|
|
|
|
colors = Item.InnerText.Split(',');
|
|
|
|
|
else
|
|
|
|
|
colors = new string[0];
|
2015-02-08 22:51:52 +01:00
|
|
|
|
|
|
|
|
|
m_ChargingLeds[device].red = byte.Parse(colors[0]);
|
|
|
|
|
m_ChargingLeds[device].green = byte.Parse(colors[1]);
|
|
|
|
|
m_ChargingLeds[device].blue = byte.Parse(colors[2]);
|
2014-07-03 04:33:05 +02:00
|
|
|
|
}
|
|
|
|
|
catch { missingSetting = true; }
|
2014-11-18 22:23:41 +01:00
|
|
|
|
if (m_Xdoc.SelectSingleNode("/" + rootname + "/ChargingColor") == null)
|
2014-07-03 04:33:05 +02:00
|
|
|
|
{
|
2015-02-08 22:51:52 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/ChargingRed"); Byte.TryParse(Item.InnerText, out m_ChargingLeds[device].red); }
|
2014-06-26 20:02:01 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-02-08 22:51:52 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/ChargingGreen"); Byte.TryParse(Item.InnerText, out m_ChargingLeds[device].green); }
|
2014-06-02 19:29:38 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-02-08 22:51:52 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/ChargingBlue"); Byte.TryParse(Item.InnerText, out m_ChargingLeds[device].blue); }
|
2014-06-26 20:02:01 +02:00
|
|
|
|
catch { missingSetting = true; }
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
}
|
2014-08-23 22:52:20 +02:00
|
|
|
|
try
|
|
|
|
|
{
|
2014-11-18 22:23:41 +01:00
|
|
|
|
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/FlashColor");
|
2014-08-23 22:52:20 +02:00
|
|
|
|
string[] colors;
|
|
|
|
|
if (!string.IsNullOrEmpty(Item.InnerText))
|
|
|
|
|
colors = Item.InnerText.Split(',');
|
|
|
|
|
else
|
|
|
|
|
colors = new string[0];
|
2015-02-08 22:51:52 +01:00
|
|
|
|
m_FlashLeds[device].red = byte.Parse(colors[0]);
|
|
|
|
|
m_FlashLeds[device].green = byte.Parse(colors[1]);
|
|
|
|
|
m_FlashLeds[device].blue = byte.Parse(colors[2]);
|
2014-08-23 22:52:20 +02:00
|
|
|
|
}
|
|
|
|
|
catch { missingSetting = true; }
|
2015-11-30 22:15:17 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/touchpadJitterCompensation"); bool.TryParse(Item.InnerText, out touchpadJitterCompensation[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-11-30 22:15:17 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/lowerRCOn"); bool.TryParse(Item.InnerText, out lowerRCOn[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-11-30 22:15:17 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/tapSensitivity"); byte.TryParse(Item.InnerText, out tapSensitivity[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-11-30 22:15:17 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/doubleTap"); bool.TryParse(Item.InnerText, out doubleTap[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-11-30 22:15:17 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/scrollSensitivity"); int.TryParse(Item.InnerText, out scrollSensitivity[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-11-30 22:15:17 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LeftTriggerMiddle"); byte.TryParse(Item.InnerText, out l2Deadzone[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-11-30 22:15:17 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/RightTriggerMiddle"); byte.TryParse(Item.InnerText, out r2Deadzone[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2017-03-30 09:37:01 +02:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/L2AntiDeadZone"); int.TryParse(Item.InnerText, out l2AntiDeadzone[device]); }
|
|
|
|
|
catch { missingSetting = true; }
|
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/R2AntiDeadZone"); int.TryParse(Item.InnerText, out r2AntiDeadzone[device]); }
|
|
|
|
|
catch { missingSetting = true; }
|
2015-11-30 22:15:17 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/ButtonMouseSensitivity"); int.TryParse(Item.InnerText, out buttonMouseSensitivity[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-11-30 22:15:17 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/Rainbow"); double.TryParse(Item.InnerText, out rainbow[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { rainbow[device] = 0; missingSetting = true; }
|
2015-04-21 21:00:09 +02:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LSDeadZone"); int.TryParse(Item.InnerText, out LSDeadzone[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-04-21 21:00:09 +02:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/RSDeadZone"); int.TryParse(Item.InnerText, out RSDeadzone[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2017-03-27 11:50:32 +02:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LSAntiDeadZone"); int.TryParse(Item.InnerText, out LSAntiDeadzone[device]); }
|
|
|
|
|
catch { missingSetting = true; }
|
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/RSAntiDeadZone"); int.TryParse(Item.InnerText, out RSAntiDeadzone[device]); }
|
|
|
|
|
catch { missingSetting = true; }
|
2015-11-30 22:15:17 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/SXDeadZone"); double.TryParse(Item.InnerText, out SXDeadzone[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-11-30 22:15:17 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/SZDeadZone"); double.TryParse(Item.InnerText, out SZDeadzone[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-12-05 09:55:11 +01:00
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/Sensitivity");
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
string[] s = Item.InnerText.Split('|');
|
|
|
|
|
if (s.Length == 1)
|
|
|
|
|
s = Item.InnerText.Split(',');
|
2016-10-09 03:36:16 +02:00
|
|
|
|
if (!double.TryParse(s[0], out LSSens[device]) || LSSens[device] < .5f)
|
|
|
|
|
LSSens[device] = 1;
|
|
|
|
|
if (!double.TryParse(s[1], out RSSens[device]) || RSSens[device] < .5f)
|
|
|
|
|
RSSens[device] = 1;
|
2017-03-19 09:29:45 +01:00
|
|
|
|
if (!double.TryParse(s[2], out l2Sens[device]) || l2Sens[device] < .1f)
|
2016-10-09 03:36:16 +02:00
|
|
|
|
l2Sens[device] = 1;
|
2017-03-19 09:29:45 +01:00
|
|
|
|
if (!double.TryParse(s[3], out r2Sens[device]) || r2Sens[device] < .1f)
|
2016-10-09 03:36:16 +02:00
|
|
|
|
r2Sens[device] = 1;
|
|
|
|
|
if (!double.TryParse(s[4], out SXSens[device]) || SXSens[device] < .5f)
|
|
|
|
|
SXSens[device] = 1;
|
|
|
|
|
if (!double.TryParse(s[5], out SZSens[device]) || SZSens[device] < .5f)
|
|
|
|
|
SZSens[device] = 1;
|
2015-12-05 09:55:11 +01:00
|
|
|
|
}
|
|
|
|
|
catch { missingSetting = true; }
|
2015-11-30 22:15:17 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/ChargingType"); int.TryParse(Item.InnerText, out chargingType[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-11-30 22:15:17 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/MouseAcceleration"); bool.TryParse(Item.InnerText, out mouseAccel[device]); }
|
2014-07-03 04:33:05 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2015-12-18 07:25:51 +01:00
|
|
|
|
int shiftM = 0;
|
|
|
|
|
if (m_Xdoc.SelectSingleNode("/" + rootname + "/ShiftModifier") != null)
|
|
|
|
|
int.TryParse(m_Xdoc.SelectSingleNode("/" + rootname + "/ShiftModifier").InnerText, out shiftM);
|
2014-09-15 04:37:14 +02:00
|
|
|
|
try
|
|
|
|
|
{
|
2014-11-18 22:23:41 +01:00
|
|
|
|
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LaunchProgram");
|
2014-09-15 04:37:14 +02:00
|
|
|
|
launchProgram[device] = Item.InnerText;
|
|
|
|
|
if (launchprogram == true && launchProgram[device] != string.Empty) System.Diagnostics.Process.Start(launchProgram[device]);
|
|
|
|
|
}
|
2014-07-26 01:17:45 +02:00
|
|
|
|
catch { launchProgram[device] = string.Empty; missingSetting = true; }
|
2014-09-15 04:37:14 +02:00
|
|
|
|
try
|
|
|
|
|
{
|
2014-11-18 22:23:41 +01:00
|
|
|
|
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/DinputOnly");
|
2014-09-15 04:37:14 +02:00
|
|
|
|
Boolean.TryParse(Item.InnerText, out dinputOnly[device]);
|
2014-09-15 04:52:21 +02:00
|
|
|
|
if (device < 4)
|
|
|
|
|
{
|
|
|
|
|
if (dinputOnly[device] == true) control.x360Bus.Unplug(device);
|
2014-10-31 20:00:15 +01:00
|
|
|
|
else if (control.DS4Controllers[device] != null && control.DS4Controllers[device].IsAlive()) control.x360Bus.Plugin(device);
|
2014-09-15 04:52:21 +02:00
|
|
|
|
}
|
2014-09-15 04:37:14 +02:00
|
|
|
|
}
|
2014-08-23 22:52:20 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2014-09-15 04:37:14 +02:00
|
|
|
|
try
|
|
|
|
|
{
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/StartTouchpadOff");
|
2014-09-15 04:37:14 +02:00
|
|
|
|
Boolean.TryParse(Item.InnerText, out startTouchpadOff[device]);
|
|
|
|
|
if (startTouchpadOff[device] == true) control.StartTPOff(device);
|
|
|
|
|
}
|
|
|
|
|
catch { startTouchpadOff[device] = false; missingSetting = true; }
|
2014-11-15 22:54:14 +01:00
|
|
|
|
try
|
2014-11-18 22:23:41 +01:00
|
|
|
|
{ Item = m_Xdoc.SelectSingleNode("/" + rootname + "/UseTPforControls"); Boolean.TryParse(Item.InnerText, out useTPforControls[device]); }
|
2014-11-15 22:54:14 +01:00
|
|
|
|
catch { useTPforControls[device] = false; missingSetting = true; }
|
2015-11-28 06:47:26 +01:00
|
|
|
|
try
|
|
|
|
|
{ Item = m_Xdoc.SelectSingleNode("/" + rootname + "/UseSAforMouse"); Boolean.TryParse(Item.InnerText, out useSAforMouse[device]); }
|
|
|
|
|
catch { useSAforMouse[device] = false; missingSetting = true; }
|
|
|
|
|
try
|
|
|
|
|
{ Item = m_Xdoc.SelectSingleNode("/" + rootname + "/SATriggers"); sATriggers[device] = Item.InnerText; }
|
|
|
|
|
catch { sATriggers[device] = ""; missingSetting = true; }
|
|
|
|
|
try
|
|
|
|
|
{ Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroSensitivity"); int.TryParse(Item.InnerText, out gyroSensitivity[device]); }
|
|
|
|
|
catch { gyroSensitivity[device] = 100; missingSetting = true; }
|
|
|
|
|
try
|
|
|
|
|
{ Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroInvert"); int.TryParse(Item.InnerText, out gyroInvert[device]); }
|
|
|
|
|
catch { gyroInvert[device] = 0; missingSetting = true; }
|
2014-12-13 21:12:03 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LSCurve"); int.TryParse(Item.InnerText, out lsCurve[device]); }
|
|
|
|
|
catch { missingSetting = true; }
|
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/RSCurve"); int.TryParse(Item.InnerText, out rsCurve[device]); }
|
|
|
|
|
catch { missingSetting = true; }
|
|
|
|
|
try
|
|
|
|
|
{
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/ProfileActions");
|
2014-12-13 21:12:03 +01:00
|
|
|
|
profileActions[device].Clear();
|
|
|
|
|
if (!string.IsNullOrEmpty(Item.InnerText))
|
2017-04-29 02:19:05 +02:00
|
|
|
|
{
|
|
|
|
|
string[] actionNames = Item.InnerText.Split('/');
|
|
|
|
|
for (int actIndex = 0, actLen = actionNames.Length; actIndex < actLen; actIndex++)
|
|
|
|
|
{
|
|
|
|
|
string tempActionName = actionNames[actIndex];
|
|
|
|
|
if (!profileActions[device].Contains(tempActionName))
|
|
|
|
|
{
|
|
|
|
|
profileActions[device].Add(tempActionName);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
}
|
2014-12-13 21:12:03 +01:00
|
|
|
|
catch { profileActions[device].Clear(); missingSetting = true; }
|
2015-12-18 07:25:51 +01:00
|
|
|
|
|
|
|
|
|
foreach (DS4ControlSettings dcs in ds4settings[device])
|
|
|
|
|
dcs.Reset();
|
|
|
|
|
|
2017-03-28 17:27:15 +02:00
|
|
|
|
containsCustomAction[device] = false;
|
|
|
|
|
containsCustomExtras[device] = false;
|
2017-04-02 02:46:51 +02:00
|
|
|
|
profileActionCount[device] = profileActions[device].Count;
|
|
|
|
|
profileActionDict[device].Clear();
|
|
|
|
|
profileActionIndexDict[device].Clear();
|
|
|
|
|
foreach (string actionname in profileActions[device])
|
|
|
|
|
{
|
2017-04-29 02:19:05 +02:00
|
|
|
|
profileActionDict[device][actionname] = Global.GetAction(actionname);
|
|
|
|
|
profileActionIndexDict[device][actionname] = Global.GetActionIndexOf(actionname);
|
2017-04-02 02:46:51 +02:00
|
|
|
|
}
|
2017-03-28 17:27:15 +02:00
|
|
|
|
|
2014-07-03 04:33:05 +02:00
|
|
|
|
DS4KeyType keyType;
|
2015-12-18 07:25:51 +01:00
|
|
|
|
ushort wvk;
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
|
2014-07-03 04:33:05 +02:00
|
|
|
|
{
|
2014-11-18 22:23:41 +01:00
|
|
|
|
XmlNode ParentItem = m_Xdoc.SelectSingleNode("/" + rootname + "/Control/Button");
|
2014-07-03 04:33:05 +02:00
|
|
|
|
if (ParentItem != null)
|
|
|
|
|
foreach (XmlNode item in ParentItem.ChildNodes)
|
2015-12-18 07:25:51 +01:00
|
|
|
|
{
|
|
|
|
|
UpdateDS4CSetting(device, item.Name, false, getX360ControlsByName(item.InnerText), "", DS4KeyType.None, 0);
|
2014-07-03 04:33:05 +02:00
|
|
|
|
customMapButtons.Add(getDS4ControlsByName(item.Name), getX360ControlsByName(item.InnerText));
|
2015-12-18 07:25:51 +01:00
|
|
|
|
}
|
2014-11-18 22:23:41 +01:00
|
|
|
|
ParentItem = m_Xdoc.SelectSingleNode("/" + rootname + "/Control/Macro");
|
2014-07-03 04:33:05 +02:00
|
|
|
|
if (ParentItem != null)
|
|
|
|
|
foreach (XmlNode item in ParentItem.ChildNodes)
|
2015-12-18 07:25:51 +01:00
|
|
|
|
{
|
2014-07-03 04:33:05 +02:00
|
|
|
|
customMapMacros.Add(getDS4ControlsByName(item.Name), item.InnerText);
|
2015-12-18 07:25:51 +01:00
|
|
|
|
string[] skeys;
|
|
|
|
|
int[] keys;
|
|
|
|
|
if (!string.IsNullOrEmpty(item.InnerText))
|
|
|
|
|
{
|
|
|
|
|
skeys = item.InnerText.Split('/');
|
|
|
|
|
keys = new int[skeys.Length];
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
skeys = new string[0];
|
|
|
|
|
keys = new int[0];
|
|
|
|
|
}
|
|
|
|
|
for (int i = 0; i < keys.Length; i++)
|
|
|
|
|
keys[i] = int.Parse(skeys[i]);
|
|
|
|
|
UpdateDS4CSetting(device, item.Name, false, keys, "", DS4KeyType.None, 0);
|
|
|
|
|
}
|
2014-11-18 22:23:41 +01:00
|
|
|
|
ParentItem = m_Xdoc.SelectSingleNode("/" + rootname + "/Control/Key");
|
2014-07-03 04:33:05 +02:00
|
|
|
|
if (ParentItem != null)
|
|
|
|
|
foreach (XmlNode item in ParentItem.ChildNodes)
|
2015-12-18 07:25:51 +01:00
|
|
|
|
if (ushort.TryParse(item.InnerText, out wvk))
|
|
|
|
|
{
|
|
|
|
|
UpdateDS4CSetting(device, item.Name, false, wvk, "", DS4KeyType.None, 0);
|
2014-07-03 04:33:05 +02:00
|
|
|
|
customMapKeys.Add(getDS4ControlsByName(item.Name), wvk);
|
2015-12-18 07:25:51 +01:00
|
|
|
|
}
|
2014-12-02 01:07:29 +01:00
|
|
|
|
ParentItem = m_Xdoc.SelectSingleNode("/" + rootname + "/Control/Extras");
|
2014-12-17 19:29:22 +01:00
|
|
|
|
if (ParentItem != null)
|
2014-12-02 01:07:29 +01:00
|
|
|
|
foreach (XmlNode item in ParentItem.ChildNodes)
|
2014-12-17 19:29:22 +01:00
|
|
|
|
if (item.InnerText != string.Empty)
|
2015-12-18 07:25:51 +01:00
|
|
|
|
{
|
|
|
|
|
UpdateDS4CExtra(device, item.Name, false, item.InnerText);
|
2014-12-17 19:29:22 +01:00
|
|
|
|
customMapExtras.Add(getDS4ControlsByName(item.Name), item.InnerText);
|
2015-12-18 07:25:51 +01:00
|
|
|
|
}
|
2014-12-17 19:29:22 +01:00
|
|
|
|
else
|
|
|
|
|
ParentItem.RemoveChild(item);
|
2014-11-18 22:23:41 +01:00
|
|
|
|
ParentItem = m_Xdoc.SelectSingleNode("/" + rootname + "/Control/KeyType");
|
2014-07-03 04:33:05 +02:00
|
|
|
|
if (ParentItem != null)
|
|
|
|
|
foreach (XmlNode item in ParentItem.ChildNodes)
|
|
|
|
|
if (item != null)
|
|
|
|
|
{
|
|
|
|
|
keyType = DS4KeyType.None;
|
|
|
|
|
if (item.InnerText.Contains(DS4KeyType.ScanCode.ToString()))
|
|
|
|
|
keyType |= DS4KeyType.ScanCode;
|
|
|
|
|
if (item.InnerText.Contains(DS4KeyType.Toggle.ToString()))
|
|
|
|
|
keyType |= DS4KeyType.Toggle;
|
|
|
|
|
if (item.InnerText.Contains(DS4KeyType.Macro.ToString()))
|
|
|
|
|
keyType |= DS4KeyType.Macro;
|
|
|
|
|
if (item.InnerText.Contains(DS4KeyType.HoldMacro.ToString()))
|
|
|
|
|
keyType |= DS4KeyType.HoldMacro;
|
|
|
|
|
if (item.InnerText.Contains(DS4KeyType.Unbound.ToString()))
|
|
|
|
|
keyType |= DS4KeyType.Unbound;
|
|
|
|
|
if (keyType != DS4KeyType.None)
|
2015-12-18 07:25:51 +01:00
|
|
|
|
{
|
|
|
|
|
UpdateDS4CKeyType(device, item.Name, false, keyType);
|
2014-07-03 04:33:05 +02:00
|
|
|
|
customMapKeyTypes.Add(getDS4ControlsByName(item.Name), keyType);
|
2015-12-18 07:25:51 +01:00
|
|
|
|
}
|
2014-07-03 04:33:05 +02:00
|
|
|
|
}
|
2015-12-18 07:25:51 +01:00
|
|
|
|
|
|
|
|
|
ParentItem = m_Xdoc.SelectSingleNode("/" + rootname + "/ShiftControl/Button");
|
|
|
|
|
if (ParentItem != null)
|
|
|
|
|
foreach (XmlElement item in ParentItem.ChildNodes)
|
|
|
|
|
{
|
|
|
|
|
int shiftT = shiftM;
|
|
|
|
|
if (item.HasAttribute("Trigger"))
|
|
|
|
|
int.TryParse(item.Attributes["Trigger"].Value, out shiftT);
|
|
|
|
|
UpdateDS4CSetting(device, item.Name, true, getX360ControlsByName(item.InnerText), "", DS4KeyType.None, shiftT);
|
|
|
|
|
shiftCustomMapButtons.Add(getDS4ControlsByName(item.Name), getX360ControlsByName(item.InnerText));
|
|
|
|
|
}
|
|
|
|
|
ParentItem = m_Xdoc.SelectSingleNode("/" + rootname + "/ShiftControl/Macro");
|
|
|
|
|
if (ParentItem != null)
|
|
|
|
|
foreach (XmlElement item in ParentItem.ChildNodes)
|
|
|
|
|
{
|
|
|
|
|
shiftCustomMapMacros.Add(getDS4ControlsByName(item.Name), item.InnerText);
|
|
|
|
|
string[] skeys;
|
|
|
|
|
int[] keys;
|
|
|
|
|
if (!string.IsNullOrEmpty(item.InnerText))
|
|
|
|
|
{
|
|
|
|
|
skeys = item.InnerText.Split('/');
|
|
|
|
|
keys = new int[skeys.Length];
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
skeys = new string[0];
|
|
|
|
|
keys = new int[0];
|
|
|
|
|
}
|
|
|
|
|
for (int i = 0; i < keys.Length; i++)
|
|
|
|
|
keys[i] = int.Parse(skeys[i]);
|
|
|
|
|
int shiftT = shiftM;
|
|
|
|
|
if (item.HasAttribute("Trigger"))
|
|
|
|
|
int.TryParse(item.Attributes["Trigger"].Value, out shiftT);
|
|
|
|
|
UpdateDS4CSetting(device, item.Name, true, keys, "", DS4KeyType.None, shiftT);
|
|
|
|
|
}
|
|
|
|
|
ParentItem = m_Xdoc.SelectSingleNode("/" + rootname + "/ShiftControl/Key");
|
|
|
|
|
if (ParentItem != null)
|
|
|
|
|
foreach (XmlElement item in ParentItem.ChildNodes)
|
|
|
|
|
if (ushort.TryParse(item.InnerText, out wvk))
|
|
|
|
|
{
|
|
|
|
|
int shiftT = shiftM;
|
|
|
|
|
if (item.HasAttribute("Trigger"))
|
|
|
|
|
int.TryParse(item.Attributes["Trigger"].Value, out shiftT);
|
|
|
|
|
UpdateDS4CSetting(device, item.Name, true, wvk, "", DS4KeyType.None, shiftT);
|
|
|
|
|
shiftCustomMapKeys.Add(getDS4ControlsByName(item.Name), wvk);
|
|
|
|
|
}
|
|
|
|
|
ParentItem = m_Xdoc.SelectSingleNode("/" + rootname + "/ShiftControl/Extras");
|
|
|
|
|
if (ParentItem != null)
|
|
|
|
|
foreach (XmlElement item in ParentItem.ChildNodes)
|
|
|
|
|
if (item.InnerText != string.Empty)
|
|
|
|
|
{
|
|
|
|
|
UpdateDS4CExtra(device, item.Name, true, item.InnerText);
|
2014-12-02 01:07:29 +01:00
|
|
|
|
shiftCustomMapExtras.Add(getDS4ControlsByName(item.Name), item.InnerText);
|
2015-12-18 07:25:51 +01:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
ParentItem.RemoveChild(item);
|
|
|
|
|
ParentItem = m_Xdoc.SelectSingleNode("/" + rootname + "/ShiftControl/KeyType");
|
|
|
|
|
if (ParentItem != null)
|
|
|
|
|
foreach (XmlElement item in ParentItem.ChildNodes)
|
|
|
|
|
if (item != null)
|
|
|
|
|
{
|
|
|
|
|
keyType = DS4KeyType.None;
|
|
|
|
|
if (item.InnerText.Contains(DS4KeyType.ScanCode.ToString()))
|
|
|
|
|
keyType |= DS4KeyType.ScanCode;
|
|
|
|
|
if (item.InnerText.Contains(DS4KeyType.Toggle.ToString()))
|
|
|
|
|
keyType |= DS4KeyType.Toggle;
|
|
|
|
|
if (item.InnerText.Contains(DS4KeyType.Macro.ToString()))
|
|
|
|
|
keyType |= DS4KeyType.Macro;
|
|
|
|
|
if (item.InnerText.Contains(DS4KeyType.HoldMacro.ToString()))
|
|
|
|
|
keyType |= DS4KeyType.HoldMacro;
|
|
|
|
|
if (item.InnerText.Contains(DS4KeyType.Unbound.ToString()))
|
|
|
|
|
keyType |= DS4KeyType.Unbound;
|
|
|
|
|
if (keyType != DS4KeyType.None)
|
2014-04-27 21:32:09 +02:00
|
|
|
|
{
|
2015-12-18 07:25:51 +01:00
|
|
|
|
UpdateDS4CKeyType(device, item.Name, true, keyType);
|
|
|
|
|
shiftCustomMapKeyTypes.Add(getDS4ControlsByName(item.Name), keyType);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
2015-12-18 07:25:51 +01:00
|
|
|
|
}
|
|
|
|
|
//LoadButtons(buttons, "Control", customMapKeyTypes, customMapKeys, customMapButtons, customMapMacros, customMapExtras);
|
|
|
|
|
//LoadButtons(shiftbuttons, "ShiftControl", shiftCustomMapKeyTypes, shiftCustomMapKeys, shiftCustomMapButtons, shiftCustomMapMacros, shiftCustomMapExtras);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
}
|
2014-07-03 04:33:05 +02:00
|
|
|
|
//catch { Loaded = false; }
|
2015-12-18 07:25:51 +01:00
|
|
|
|
/*if (Loaded)
|
2014-04-27 21:32:09 +02:00
|
|
|
|
{
|
2014-04-29 11:19:00 +02:00
|
|
|
|
this.customMapButtons[device] = customMapButtons;
|
|
|
|
|
this.customMapKeys[device] = customMapKeys;
|
|
|
|
|
this.customMapKeyTypes[device] = customMapKeyTypes;
|
2014-05-28 04:49:58 +02:00
|
|
|
|
this.customMapMacros[device] = customMapMacros;
|
2014-12-02 01:07:29 +01:00
|
|
|
|
this.customMapExtras[device] = customMapExtras;
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
|
|
|
|
|
this.shiftCustomMapButtons[device] = shiftCustomMapButtons;
|
|
|
|
|
this.shiftCustomMapKeys[device] = shiftCustomMapKeys;
|
|
|
|
|
this.shiftCustomMapKeyTypes[device] = shiftCustomMapKeyTypes;
|
|
|
|
|
this.shiftCustomMapMacros[device] = shiftCustomMapMacros;
|
2014-12-02 01:07:29 +01:00
|
|
|
|
this.shiftCustomMapExtras[device] = shiftCustomMapExtras;
|
2015-12-18 07:25:51 +01:00
|
|
|
|
}*/
|
2014-03-28 02:50:40 +01:00
|
|
|
|
// Only add missing settings if the actual load was graceful
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (missingSetting && Loaded)// && buttons != null)
|
2015-12-18 07:25:51 +01:00
|
|
|
|
SaveProfile(device, profilepath);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
|
2017-03-28 17:27:15 +02:00
|
|
|
|
containsCustomAction[device] = HasCustomActions(device);
|
|
|
|
|
containsCustomExtras[device] = HasCustomExtras(device);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
return Loaded;
|
|
|
|
|
}
|
|
|
|
|
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
public void LoadButtons(System.Windows.Forms.Control[] buttons, string control, Dictionary<DS4Controls, DS4KeyType> customMapKeyTypes,
|
2014-12-02 01:07:29 +01:00
|
|
|
|
Dictionary<DS4Controls, UInt16> customMapKeys, Dictionary<DS4Controls, X360Controls> customMapButtons, Dictionary<DS4Controls, String> customMapMacros, Dictionary<DS4Controls, String> customMapExtras)
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
{
|
|
|
|
|
XmlNode Item;
|
|
|
|
|
DS4KeyType keyType;
|
|
|
|
|
UInt16 wvk;
|
2014-11-18 22:23:41 +01:00
|
|
|
|
string rootname = "DS4Windows";
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
foreach (var button in buttons)
|
|
|
|
|
try
|
|
|
|
|
{
|
2014-11-18 22:23:41 +01:00
|
|
|
|
if (m_Xdoc.SelectSingleNode(rootname) == null)
|
|
|
|
|
{
|
|
|
|
|
rootname = "ScpControl";
|
|
|
|
|
}
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
//bool foundBinding = false;
|
2015-11-30 22:15:17 +01:00
|
|
|
|
button.Font = new Font(button.Font, FontStyle.Regular);
|
2014-11-18 22:23:41 +01:00
|
|
|
|
Item = m_Xdoc.SelectSingleNode(String.Format("/" + rootname + "/" + control + "/KeyType/{0}", button.Name));
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (Item != null)
|
|
|
|
|
{
|
|
|
|
|
//foundBinding = true;
|
|
|
|
|
keyType = DS4KeyType.None;
|
|
|
|
|
if (Item.InnerText.Contains(DS4KeyType.Unbound.ToString()))
|
|
|
|
|
{
|
|
|
|
|
keyType = DS4KeyType.Unbound;
|
|
|
|
|
button.Tag = "Unbound";
|
|
|
|
|
button.Text = "Unbound";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
bool SC = Item.InnerText.Contains(DS4KeyType.ScanCode.ToString());
|
|
|
|
|
bool TG = Item.InnerText.Contains(DS4KeyType.Toggle.ToString());
|
|
|
|
|
bool MC = Item.InnerText.Contains(DS4KeyType.Macro.ToString());
|
|
|
|
|
bool MR = Item.InnerText.Contains(DS4KeyType.HoldMacro.ToString());
|
|
|
|
|
button.Font = new Font(button.Font,
|
|
|
|
|
(SC ? FontStyle.Bold : FontStyle.Regular) | (TG ? FontStyle.Italic : FontStyle.Regular) |
|
|
|
|
|
(MC ? FontStyle.Underline : FontStyle.Regular) | (MR ? FontStyle.Strikeout : FontStyle.Regular));
|
|
|
|
|
if (Item.InnerText.Contains(DS4KeyType.ScanCode.ToString()))
|
|
|
|
|
keyType |= DS4KeyType.ScanCode;
|
|
|
|
|
if (Item.InnerText.Contains(DS4KeyType.Toggle.ToString()))
|
|
|
|
|
keyType |= DS4KeyType.Toggle;
|
|
|
|
|
if (Item.InnerText.Contains(DS4KeyType.Macro.ToString()))
|
|
|
|
|
keyType |= DS4KeyType.Macro;
|
|
|
|
|
}
|
|
|
|
|
if (keyType != DS4KeyType.None)
|
|
|
|
|
customMapKeyTypes.Add(getDS4ControlsByName(Item.Name), keyType);
|
|
|
|
|
}
|
2014-12-02 01:07:29 +01:00
|
|
|
|
string extras;
|
|
|
|
|
Item = m_Xdoc.SelectSingleNode(String.Format("/" + rootname + "/" + control + "/Extras/{0}", button.Name));
|
|
|
|
|
if (Item != null)
|
|
|
|
|
{
|
2014-12-17 19:29:22 +01:00
|
|
|
|
if (Item.InnerText != string.Empty)
|
|
|
|
|
{
|
|
|
|
|
extras = Item.InnerText;
|
|
|
|
|
customMapExtras.Add(getDS4ControlsByName(button.Name), Item.InnerText);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
m_Xdoc.RemoveChild(Item);
|
|
|
|
|
extras = "0,0,0,0,0,0,0,0";
|
|
|
|
|
}
|
2014-12-02 01:07:29 +01:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
extras = "0,0,0,0,0,0,0,0";
|
2014-11-18 22:23:41 +01:00
|
|
|
|
Item = m_Xdoc.SelectSingleNode(String.Format("/" + rootname + "/" + control + "/Macro/{0}", button.Name));
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (Item != null)
|
|
|
|
|
{
|
|
|
|
|
string[] splitter = Item.InnerText.Split('/');
|
|
|
|
|
int[] keys = new int[splitter.Length];
|
|
|
|
|
for (int i = 0; i < keys.Length; i++)
|
|
|
|
|
{
|
|
|
|
|
keys[i] = int.Parse(splitter[i]);
|
|
|
|
|
if (keys[i] < 255) splitter[i] = ((System.Windows.Forms.Keys)keys[i]).ToString();
|
|
|
|
|
else if (keys[i] == 256) splitter[i] = "Left Mouse Button";
|
|
|
|
|
else if (keys[i] == 257) splitter[i] = "Right Mouse Button";
|
|
|
|
|
else if (keys[i] == 258) splitter[i] = "Middle Mouse Button";
|
|
|
|
|
else if (keys[i] == 259) splitter[i] = "4th Mouse Button";
|
|
|
|
|
else if (keys[i] == 260) splitter[i] = "5th Mouse Button";
|
|
|
|
|
else if (keys[i] > 300) splitter[i] = "Wait " + (keys[i] - 300) + "ms";
|
|
|
|
|
}
|
|
|
|
|
button.Text = "Macro";
|
2014-12-02 01:07:29 +01:00
|
|
|
|
button.Tag = new KeyValuePair<int[], string>(keys, extras);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
customMapMacros.Add(getDS4ControlsByName(button.Name), Item.InnerText);
|
|
|
|
|
}
|
2014-11-18 22:23:41 +01:00
|
|
|
|
else if (m_Xdoc.SelectSingleNode(String.Format("/" + rootname + "/" + control + "/Key/{0}", button.Name)) != null)
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
{
|
2014-11-18 22:23:41 +01:00
|
|
|
|
Item = m_Xdoc.SelectSingleNode(String.Format("/" + rootname + "/" + control + "/Key/{0}", button.Name));
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (UInt16.TryParse(Item.InnerText, out wvk))
|
|
|
|
|
{
|
|
|
|
|
//foundBinding = true;
|
|
|
|
|
customMapKeys.Add(getDS4ControlsByName(Item.Name), wvk);
|
2014-12-02 01:07:29 +01:00
|
|
|
|
button.Tag = new KeyValuePair<int, string>(wvk, extras);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
button.Text = ((System.Windows.Forms.Keys)wvk).ToString();
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-12-02 01:07:29 +01:00
|
|
|
|
else if (m_Xdoc.SelectSingleNode(String.Format("/" + rootname + "/" + control + "/Button/{0}", button.Name)) != null)
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
{
|
2014-11-18 22:23:41 +01:00
|
|
|
|
Item = m_Xdoc.SelectSingleNode(String.Format("/" + rootname + "/" + control + "/Button/{0}", button.Name));
|
2014-12-02 01:07:29 +01:00
|
|
|
|
//foundBinding = true;
|
|
|
|
|
button.Tag = new KeyValuePair<string, string>(Item.InnerText, extras);
|
|
|
|
|
button.Text = Item.InnerText;
|
|
|
|
|
customMapButtons.Add(getDS4ControlsByName(button.Name), getX360ControlsByName(Item.InnerText));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
button.Tag = new KeyValuePair<object, string>(null, extras);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-04-27 21:32:09 +02:00
|
|
|
|
public bool Load()
|
|
|
|
|
{
|
|
|
|
|
Boolean Loaded = true;
|
2014-04-29 11:23:28 +02:00
|
|
|
|
Boolean missingSetting = false;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (File.Exists(m_Profile))
|
|
|
|
|
{
|
|
|
|
|
XmlNode Item;
|
|
|
|
|
|
|
|
|
|
m_Xdoc.Load(m_Profile);
|
|
|
|
|
|
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/useExclusiveMode"); Boolean.TryParse(Item.InnerText, out useExclusiveMode); }
|
|
|
|
|
catch { missingSetting = true; }
|
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/startMinimized"); Boolean.TryParse(Item.InnerText, out startMinimized); }
|
|
|
|
|
catch { missingSetting = true; }
|
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/formWidth"); Int32.TryParse(Item.InnerText, out formWidth); }
|
|
|
|
|
catch { missingSetting = true; }
|
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/formHeight"); Int32.TryParse(Item.InnerText, out formHeight); }
|
|
|
|
|
catch { missingSetting = true; }
|
2017-03-23 05:45:20 +01:00
|
|
|
|
try {
|
|
|
|
|
Item = m_Xdoc.SelectSingleNode("/Profile/Controller1"); profilePath[0] = Item.InnerText;
|
|
|
|
|
if (profilePath[0].ToLower().Contains("distance"))
|
|
|
|
|
{
|
|
|
|
|
distanceProfiles[0] = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-04-27 21:32:09 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2017-03-23 05:45:20 +01:00
|
|
|
|
try {
|
|
|
|
|
Item = m_Xdoc.SelectSingleNode("/Profile/Controller2"); profilePath[1] = Item.InnerText;
|
|
|
|
|
if (profilePath[1].ToLower().Contains("distance"))
|
|
|
|
|
{
|
|
|
|
|
distanceProfiles[1] = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-04-27 21:32:09 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2017-03-23 05:45:20 +01:00
|
|
|
|
try {
|
|
|
|
|
Item = m_Xdoc.SelectSingleNode("/Profile/Controller3"); profilePath[2] = Item.InnerText;
|
|
|
|
|
if (profilePath[2].ToLower().Contains("distance"))
|
|
|
|
|
{
|
|
|
|
|
distanceProfiles[2] = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-04-27 21:32:09 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2017-03-23 05:45:20 +01:00
|
|
|
|
try {
|
|
|
|
|
Item = m_Xdoc.SelectSingleNode("/Profile/Controller4"); profilePath[3] = Item.InnerText;
|
|
|
|
|
if (profilePath[3].ToLower().Contains("distance"))
|
|
|
|
|
{
|
|
|
|
|
distanceProfiles[3] = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-04-27 21:32:09 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2014-05-21 19:39:56 +02:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/LastChecked"); DateTime.TryParse(Item.InnerText, out lastChecked); }
|
|
|
|
|
catch { missingSetting = true; }
|
2014-06-06 22:38:52 +02:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/CheckWhen"); Int32.TryParse(Item.InnerText, out CheckWhen); }
|
|
|
|
|
catch { missingSetting = true; }
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
try
|
|
|
|
|
{
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
Item = m_Xdoc.SelectSingleNode("/Profile/Notifications");
|
|
|
|
|
if (!int.TryParse(Item.InnerText, out notifications))
|
|
|
|
|
notifications = (Boolean.Parse(Item.InnerText) ? 2 : 0);
|
|
|
|
|
}
|
2014-06-06 22:38:52 +02:00
|
|
|
|
catch { missingSetting = true; }
|
2014-06-21 20:00:28 +02:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/DisconnectBTAtStop"); Boolean.TryParse(Item.InnerText, out disconnectBTAtStop); }
|
|
|
|
|
catch { missingSetting = true; }
|
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/SwipeProfiles"); Boolean.TryParse(Item.InnerText, out swipeProfiles); }
|
|
|
|
|
catch { missingSetting = true; }
|
2014-11-20 20:03:18 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/UseDS4ForMapping"); Boolean.TryParse(Item.InnerText, out ds4Mapping); }
|
|
|
|
|
catch { missingSetting = true; }
|
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/QuickCharge"); Boolean.TryParse(Item.InnerText, out quickCharge); }
|
|
|
|
|
catch { missingSetting = true; }
|
2014-12-03 23:36:54 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/FirstXinputPort"); Int32.TryParse(Item.InnerText, out firstXinputPort); }
|
|
|
|
|
catch { missingSetting = true; }
|
2014-12-13 21:12:03 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/CloseMinimizes"); Boolean.TryParse(Item.InnerText, out closeMini); }
|
|
|
|
|
catch { missingSetting = true; }
|
2015-02-08 22:51:52 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/DownloadLang"); Boolean.TryParse(Item.InnerText, out downloadLang); }
|
|
|
|
|
catch { missingSetting = true; }
|
2015-03-15 19:16:01 +01:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/FlashWhenLate"); Boolean.TryParse(Item.InnerText, out flashWhenLate); }
|
|
|
|
|
catch { missingSetting = true; }
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/FlashWhenLateAt"); int.TryParse(Item.InnerText, out flashWhenLateAt); }
|
|
|
|
|
catch { missingSetting = true; }
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/WhiteIcon"); Boolean.TryParse(Item.InnerText, out useWhiteIcon); }
|
|
|
|
|
catch { missingSetting = true; }
|
2015-11-28 06:47:26 +01:00
|
|
|
|
for (int i = 0; i < 4; i++)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
Item = m_Xdoc.SelectSingleNode("/Profile/CustomLed" + (i + 1));
|
|
|
|
|
string[] ss = Item.InnerText.Split(':');
|
|
|
|
|
bool.TryParse(ss[0], out useCustomLeds[i]);
|
|
|
|
|
DS4Color.TryParse(ss[1], ref m_CustomLeds[i]);
|
|
|
|
|
}
|
|
|
|
|
catch { missingSetting = true; }
|
|
|
|
|
}
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch { }
|
|
|
|
|
if (missingSetting)
|
2014-04-29 11:23:28 +02:00
|
|
|
|
Save();
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
return Loaded;
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2014-04-27 21:32:09 +02:00
|
|
|
|
public bool Save()
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
|
|
|
|
Boolean Saved = true;
|
|
|
|
|
|
2014-06-21 20:00:28 +02:00
|
|
|
|
XmlNode Node;
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
2014-06-21 20:00:28 +02:00
|
|
|
|
m_Xdoc.RemoveAll();
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
2014-06-21 20:00:28 +02:00
|
|
|
|
Node = m_Xdoc.CreateXmlDeclaration("1.0", "utf-8", String.Empty);
|
|
|
|
|
m_Xdoc.AppendChild(Node);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
2014-06-21 20:00:28 +02:00
|
|
|
|
Node = m_Xdoc.CreateComment(String.Format(" Profile Configuration Data. {0} ", DateTime.Now));
|
|
|
|
|
m_Xdoc.AppendChild(Node);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
2014-06-21 20:00:28 +02:00
|
|
|
|
Node = m_Xdoc.CreateWhitespace("\r\n");
|
|
|
|
|
m_Xdoc.AppendChild(Node);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
2014-06-21 20:00:28 +02:00
|
|
|
|
Node = m_Xdoc.CreateNode(XmlNodeType.Element, "Profile", null);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
2014-06-21 20:00:28 +02:00
|
|
|
|
XmlNode xmlUseExclNode = m_Xdoc.CreateNode(XmlNodeType.Element, "useExclusiveMode", null); xmlUseExclNode.InnerText = useExclusiveMode.ToString(); Node.AppendChild(xmlUseExclNode);
|
|
|
|
|
XmlNode xmlStartMinimized = m_Xdoc.CreateNode(XmlNodeType.Element, "startMinimized", null); xmlStartMinimized.InnerText = startMinimized.ToString(); Node.AppendChild(xmlStartMinimized);
|
|
|
|
|
XmlNode xmlFormWidth = m_Xdoc.CreateNode(XmlNodeType.Element, "formWidth", null); xmlFormWidth.InnerText = formWidth.ToString(); Node.AppendChild(xmlFormWidth);
|
|
|
|
|
XmlNode xmlFormHeight = m_Xdoc.CreateNode(XmlNodeType.Element, "formHeight", null); xmlFormHeight.InnerText = formHeight.ToString(); Node.AppendChild(xmlFormHeight);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
2014-06-21 20:00:28 +02:00
|
|
|
|
XmlNode xmlController1 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller1", null); xmlController1.InnerText = profilePath[0]; Node.AppendChild(xmlController1);
|
|
|
|
|
XmlNode xmlController2 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller2", null); xmlController2.InnerText = profilePath[1]; Node.AppendChild(xmlController2);
|
|
|
|
|
XmlNode xmlController3 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller3", null); xmlController3.InnerText = profilePath[2]; Node.AppendChild(xmlController3);
|
|
|
|
|
XmlNode xmlController4 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller4", null); xmlController4.InnerText = profilePath[3]; Node.AppendChild(xmlController4);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
2014-06-21 20:00:28 +02:00
|
|
|
|
XmlNode xmlLastChecked = m_Xdoc.CreateNode(XmlNodeType.Element, "LastChecked", null); xmlLastChecked.InnerText = lastChecked.ToString(); Node.AppendChild(xmlLastChecked);
|
|
|
|
|
XmlNode xmlCheckWhen = m_Xdoc.CreateNode(XmlNodeType.Element, "CheckWhen", null); xmlCheckWhen.InnerText = CheckWhen.ToString(); Node.AppendChild(xmlCheckWhen);
|
|
|
|
|
XmlNode xmlNotifications = m_Xdoc.CreateNode(XmlNodeType.Element, "Notifications", null); xmlNotifications.InnerText = notifications.ToString(); Node.AppendChild(xmlNotifications);
|
|
|
|
|
XmlNode xmlDisconnectBT = m_Xdoc.CreateNode(XmlNodeType.Element, "DisconnectBTAtStop", null); xmlDisconnectBT.InnerText = disconnectBTAtStop.ToString(); Node.AppendChild(xmlDisconnectBT);
|
|
|
|
|
XmlNode xmlSwipeProfiles = m_Xdoc.CreateNode(XmlNodeType.Element, "SwipeProfiles", null); xmlSwipeProfiles.InnerText = swipeProfiles.ToString(); Node.AppendChild(xmlSwipeProfiles);
|
2014-11-20 20:03:18 +01:00
|
|
|
|
XmlNode xmlDS4Mapping = m_Xdoc.CreateNode(XmlNodeType.Element, "UseDS4ForMapping", null); xmlDS4Mapping.InnerText = ds4Mapping.ToString(); Node.AppendChild(xmlDS4Mapping);
|
|
|
|
|
XmlNode xmlQuickCharge = m_Xdoc.CreateNode(XmlNodeType.Element, "QuickCharge", null); xmlQuickCharge.InnerText = quickCharge.ToString(); Node.AppendChild(xmlQuickCharge);
|
2014-12-03 23:36:54 +01:00
|
|
|
|
XmlNode xmlFirstXinputPort = m_Xdoc.CreateNode(XmlNodeType.Element, "FirstXinputPort", null); xmlFirstXinputPort.InnerText = firstXinputPort.ToString(); Node.AppendChild(xmlFirstXinputPort);
|
2015-02-08 22:51:52 +01:00
|
|
|
|
XmlNode xmlCloseMini = m_Xdoc.CreateNode(XmlNodeType.Element, "CloseMinimizes", null); xmlCloseMini.InnerText = closeMini.ToString(); Node.AppendChild(xmlCloseMini);
|
2015-03-15 19:16:01 +01:00
|
|
|
|
XmlNode xmlDownloadLang = m_Xdoc.CreateNode(XmlNodeType.Element, "DownloadLang", null); xmlDownloadLang.InnerText = downloadLang.ToString(); Node.AppendChild(xmlDownloadLang);
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
XmlNode xmlFlashWhenLate = m_Xdoc.CreateNode(XmlNodeType.Element, "FlashWhenLate", null); xmlFlashWhenLate.InnerText = flashWhenLate.ToString(); Node.AppendChild(xmlFlashWhenLate);
|
2015-11-28 06:47:26 +01:00
|
|
|
|
XmlNode xmlFlashWhenLateAt = m_Xdoc.CreateNode(XmlNodeType.Element, "FlashWhenLateAt", null); xmlFlashWhenLateAt.InnerText = flashWhenLateAt.ToString(); Node.AppendChild(xmlFlashWhenLateAt);
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
XmlNode xmlWhiteIcon = m_Xdoc.CreateNode(XmlNodeType.Element, "WhiteIcon", null); xmlWhiteIcon.InnerText = useWhiteIcon.ToString(); Node.AppendChild(xmlWhiteIcon);
|
2015-11-28 06:47:26 +01:00
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 4; i++)
|
|
|
|
|
{
|
|
|
|
|
XmlNode xmlCustomLed = m_Xdoc.CreateNode(XmlNodeType.Element, "CustomLed" + (1 + i), null);
|
|
|
|
|
xmlCustomLed.InnerText = useCustomLeds[i] + ":" + m_CustomLeds[i].red + ","+ m_CustomLeds[i].green + "," + m_CustomLeds[i].blue;
|
|
|
|
|
Node.AppendChild(xmlCustomLed);
|
|
|
|
|
}
|
|
|
|
|
/* XmlNode xmlCustomLed2 = m_Xdoc.CreateNode(XmlNodeType.Element, "CustomLed2", null); xmlCustomLed2.InnerText = profilePath[1]; Node.AppendChild(xmlCustomLed2);
|
|
|
|
|
XmlNode xmlCustomLed3 = m_Xdoc.CreateNode(XmlNodeType.Element, "CustomLed3", null); xmlCustomLed3.InnerText = profilePath[2]; Node.AppendChild(xmlCustomLed3);
|
|
|
|
|
XmlNode xmlCustomLed4 = m_Xdoc.CreateNode(XmlNodeType.Element, "CustomLed4", null); xmlCustomLed4.InnerText = profilePath[3]; Node.AppendChild(xmlCustomLed4);*/
|
2015-03-15 19:16:01 +01:00
|
|
|
|
|
2014-06-21 20:00:28 +02:00
|
|
|
|
m_Xdoc.AppendChild(Node);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
2014-06-21 20:00:28 +02:00
|
|
|
|
try { m_Xdoc.Save(m_Profile); }
|
|
|
|
|
catch (UnauthorizedAccessException) { Saved = false; }
|
2014-03-28 02:50:40 +01:00
|
|
|
|
return Saved;
|
|
|
|
|
}
|
2014-12-13 21:12:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void CreateAction()
|
|
|
|
|
{
|
|
|
|
|
XmlDocument m_Xdoc = new XmlDocument();
|
|
|
|
|
XmlNode Node;
|
|
|
|
|
|
|
|
|
|
Node = m_Xdoc.CreateXmlDeclaration("1.0", "utf-8", String.Empty);
|
|
|
|
|
m_Xdoc.AppendChild(Node);
|
|
|
|
|
|
|
|
|
|
Node = m_Xdoc.CreateComment(String.Format(" Special Actions Configuration Data. {0} ", DateTime.Now));
|
|
|
|
|
m_Xdoc.AppendChild(Node);
|
|
|
|
|
|
|
|
|
|
Node = m_Xdoc.CreateWhitespace("\r\n");
|
|
|
|
|
m_Xdoc.AppendChild(Node);
|
|
|
|
|
|
|
|
|
|
Node = m_Xdoc.CreateNode(XmlNodeType.Element, "Actions", "");
|
|
|
|
|
m_Xdoc.AppendChild(Node);
|
|
|
|
|
m_Xdoc.Save(m_Actions);
|
|
|
|
|
}
|
|
|
|
|
|
2014-12-17 19:29:22 +01:00
|
|
|
|
public bool SaveAction(string name, string controls, int mode, string details, bool edit, string extras = "")
|
2014-12-13 21:12:03 +01:00
|
|
|
|
{
|
|
|
|
|
bool saved = true;
|
|
|
|
|
if (!File.Exists(m_Actions))
|
|
|
|
|
CreateAction();
|
|
|
|
|
m_Xdoc.Load(m_Actions);
|
|
|
|
|
XmlNode Node;
|
|
|
|
|
|
|
|
|
|
Node = m_Xdoc.CreateComment(String.Format(" Special Actions Configuration Data. {0} ", DateTime.Now));
|
|
|
|
|
foreach (XmlNode node in m_Xdoc.SelectNodes("//comment()"))
|
|
|
|
|
node.ParentNode.ReplaceChild(Node, node);
|
|
|
|
|
|
|
|
|
|
Node = m_Xdoc.SelectSingleNode("Actions");
|
|
|
|
|
XmlElement el = m_Xdoc.CreateElement("Action");
|
|
|
|
|
el.SetAttribute("Name", name);
|
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Trigger")).InnerText = controls;
|
|
|
|
|
switch (mode)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Type")).InnerText = "Macro";
|
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Details")).InnerText = details;
|
2014-12-17 19:29:22 +01:00
|
|
|
|
if (extras != string.Empty)
|
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Extras")).InnerText = extras;
|
2014-12-13 21:12:03 +01:00
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Type")).InnerText = "Program";
|
2015-03-15 19:16:01 +01:00
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Details")).InnerText = details.Split('?')[0];
|
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Arguements")).InnerText = extras;
|
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Delay")).InnerText = details.Split('?')[1];
|
2014-12-13 21:12:03 +01:00
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Type")).InnerText = "Profile";
|
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Details")).InnerText = details;
|
2014-12-17 19:29:22 +01:00
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("UnloadTrigger")).InnerText = extras;
|
2014-12-13 21:12:03 +01:00
|
|
|
|
break;
|
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
|
|
|
|
case 4:
|
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Type")).InnerText = "Key";
|
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Details")).InnerText = details;
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
if (!string.IsNullOrEmpty(extras))
|
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
|
|
|
|
{
|
|
|
|
|
string[] exts = extras.Split('\n');
|
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("UnloadTrigger")).InnerText = exts[1];
|
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("UnloadStyle")).InnerText = exts[0];
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Type")).InnerText = "DisconnectBT";
|
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Details")).InnerText = details;
|
|
|
|
|
break;
|
2015-02-12 20:36:40 +01:00
|
|
|
|
case 6:
|
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Type")).InnerText = "BatteryCheck";
|
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Details")).InnerText = details;
|
|
|
|
|
break;
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
case 7:
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Type")).InnerText = "MultiAction";
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
el.AppendChild(m_Xdoc.CreateElement("Details")).InnerText = details;
|
|
|
|
|
break;
|
2014-12-13 21:12:03 +01:00
|
|
|
|
}
|
|
|
|
|
if (edit)
|
|
|
|
|
{
|
|
|
|
|
XmlNode oldxmlprocess = m_Xdoc.SelectSingleNode("/Actions/Action[@Name=\"" + name + "\"]");
|
|
|
|
|
Node.ReplaceChild(el, oldxmlprocess);
|
|
|
|
|
}
|
|
|
|
|
else { Node.AppendChild(el); }
|
|
|
|
|
m_Xdoc.AppendChild(Node);
|
|
|
|
|
try { m_Xdoc.Save(m_Actions); }
|
|
|
|
|
catch { saved = false; }
|
|
|
|
|
LoadActions();
|
|
|
|
|
return saved;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void RemoveAction(string name)
|
|
|
|
|
{
|
|
|
|
|
m_Xdoc.Load(m_Actions);
|
|
|
|
|
XmlNode Node = m_Xdoc.SelectSingleNode("Actions");
|
|
|
|
|
XmlNode Item = m_Xdoc.SelectSingleNode("/Actions/Action[@Name=\"" + name + "\"]");
|
|
|
|
|
if (Item != null)
|
|
|
|
|
Node.RemoveChild(Item);
|
|
|
|
|
m_Xdoc.AppendChild(Node);
|
|
|
|
|
m_Xdoc.Save(m_Actions);
|
|
|
|
|
LoadActions();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool LoadActions()
|
|
|
|
|
{
|
|
|
|
|
bool saved = true;
|
|
|
|
|
if (!File.Exists(Global.appdatapath + "\\Actions.xml"))
|
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
|
|
|
|
{
|
|
|
|
|
SaveAction("Disconnect Controller", "PS/Options", 5, "0", false);
|
|
|
|
|
saved = false;
|
|
|
|
|
}
|
2014-12-13 21:12:03 +01:00
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
actions.Clear();
|
|
|
|
|
XmlDocument doc = new XmlDocument();
|
|
|
|
|
doc.Load(Global.appdatapath + "\\Actions.xml");
|
|
|
|
|
XmlNodeList actionslist = doc.SelectNodes("Actions/Action");
|
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
|
|
|
|
string name, controls, type, details, extras, extras2;
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
Mapping.actionDone.Clear();
|
2014-12-13 21:12:03 +01:00
|
|
|
|
foreach (XmlNode x in actionslist)
|
|
|
|
|
{
|
|
|
|
|
name = x.Attributes["Name"].Value;
|
|
|
|
|
controls = x.ChildNodes[0].InnerText;
|
|
|
|
|
type = x.ChildNodes[1].InnerText;
|
|
|
|
|
details = x.ChildNodes[2].InnerText;
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
Mapping.actionDone.Add(new Mapping.ActionState());
|
2014-12-13 21:12:03 +01:00
|
|
|
|
if (type == "Profile")
|
|
|
|
|
{
|
2014-12-17 19:29:22 +01:00
|
|
|
|
extras = x.ChildNodes[3].InnerText;
|
2015-03-15 19:16:01 +01:00
|
|
|
|
actions.Add(new SpecialAction(name, controls, type, details, 0, extras));
|
2014-12-17 19:29:22 +01:00
|
|
|
|
}
|
|
|
|
|
else if (type == "Macro")
|
|
|
|
|
{
|
|
|
|
|
if (x.ChildNodes[3] != null) extras = x.ChildNodes[3].InnerText;
|
|
|
|
|
else extras = string.Empty;
|
2015-03-15 19:16:01 +01:00
|
|
|
|
actions.Add(new SpecialAction(name, controls, type, details, 0, extras));
|
2014-12-13 21:12:03 +01:00
|
|
|
|
}
|
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
|
|
|
|
else if (type == "Key")
|
|
|
|
|
{
|
|
|
|
|
if (x.ChildNodes[3] != null)
|
|
|
|
|
{
|
|
|
|
|
extras = x.ChildNodes[3].InnerText;
|
|
|
|
|
extras2 = x.ChildNodes[4].InnerText;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
extras = string.Empty;
|
|
|
|
|
extras2 = string.Empty;
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(extras))
|
2015-03-15 19:16:01 +01:00
|
|
|
|
actions.Add(new SpecialAction(name, controls, type, details, 0, extras2 + '\n' + extras));
|
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
|
|
|
|
else
|
|
|
|
|
actions.Add(new SpecialAction(name, controls, type, details));
|
|
|
|
|
}
|
2015-03-15 19:16:01 +01:00
|
|
|
|
else if (type == "DisconnectBT")
|
|
|
|
|
{
|
|
|
|
|
double doub;
|
|
|
|
|
if (double.TryParse(details, out doub))
|
|
|
|
|
actions.Add(new SpecialAction(name, controls, type, "", doub));
|
|
|
|
|
else
|
|
|
|
|
actions.Add(new SpecialAction(name, controls, type, ""));
|
|
|
|
|
}
|
|
|
|
|
else if (type == "BatteryCheck")
|
|
|
|
|
{
|
|
|
|
|
double doub;
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
if (double.TryParse(details.Split('|')[0], out doub))
|
|
|
|
|
actions.Add(new SpecialAction(name, controls, type, details, doub));
|
|
|
|
|
else if (double.TryParse(details.Split(',')[0], out doub))
|
2015-03-15 19:16:01 +01:00
|
|
|
|
actions.Add(new SpecialAction(name, controls, type, details, doub));
|
|
|
|
|
else
|
|
|
|
|
actions.Add(new SpecialAction(name, controls, type, details));
|
|
|
|
|
}
|
|
|
|
|
else if (type == "Program")
|
|
|
|
|
{
|
|
|
|
|
double doub;
|
|
|
|
|
if (x.ChildNodes[3] != null)
|
|
|
|
|
{
|
|
|
|
|
extras = x.ChildNodes[3].InnerText;
|
|
|
|
|
if (double.TryParse(x.ChildNodes[4].InnerText, out doub))
|
|
|
|
|
actions.Add(new SpecialAction(name, controls, type, details, doub, extras));
|
|
|
|
|
else
|
|
|
|
|
actions.Add(new SpecialAction(name, controls, type, details, 0, extras));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
actions.Add(new SpecialAction(name, controls, type, details));
|
|
|
|
|
}
|
|
|
|
|
}
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
else if (type == "XboxGameDVR" || type == "MultiAction")
|
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
|
|
|
|
{
|
|
|
|
|
actions.Add(new SpecialAction(name, controls, type, details));
|
|
|
|
|
}
|
2014-12-13 21:12:03 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch { saved = false; }
|
|
|
|
|
return saved;
|
|
|
|
|
}
|
2015-12-18 07:25:51 +01:00
|
|
|
|
|
|
|
|
|
public void UpdateDS4CSetting(int deviceNum, string buttonName, bool shift, object action, string exts, DS4KeyType kt, int trigger = 0)
|
|
|
|
|
{
|
|
|
|
|
DS4Controls dc;
|
|
|
|
|
if (buttonName.StartsWith("bn"))
|
|
|
|
|
dc = getDS4ControlsByName(buttonName);
|
|
|
|
|
else
|
|
|
|
|
dc = (DS4Controls)Enum.Parse(typeof(DS4Controls), buttonName, true);
|
2017-04-22 09:26:44 +02:00
|
|
|
|
|
|
|
|
|
//foreach (DS4ControlSettings dcs in ds4settings[deviceNum])
|
|
|
|
|
List<DS4ControlSettings> ds4settingsList = ds4settings[deviceNum];
|
|
|
|
|
for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++)
|
|
|
|
|
{
|
|
|
|
|
DS4ControlSettings dcs = ds4settingsList[i];
|
2015-12-18 07:25:51 +01:00
|
|
|
|
if (dcs.control == dc)
|
|
|
|
|
{
|
|
|
|
|
dcs.UpdateSettings(shift, action, exts, kt, trigger);
|
|
|
|
|
break;
|
|
|
|
|
}
|
2017-04-22 09:26:44 +02:00
|
|
|
|
}
|
2015-12-18 07:25:51 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void UpdateDS4CExtra(int deviceNum, string buttonName, bool shift, string exts)
|
|
|
|
|
{
|
|
|
|
|
DS4Controls dc;
|
|
|
|
|
if (buttonName.StartsWith("bn"))
|
|
|
|
|
dc = getDS4ControlsByName(buttonName);
|
|
|
|
|
else
|
|
|
|
|
dc = (DS4Controls)Enum.Parse(typeof(DS4Controls), buttonName, true);
|
2017-04-22 09:26:44 +02:00
|
|
|
|
|
|
|
|
|
//foreach (DS4ControlSettings dcs in ds4settings[deviceNum])
|
|
|
|
|
List<DS4ControlSettings> ds4settingsList = ds4settings[deviceNum];
|
|
|
|
|
for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++)
|
|
|
|
|
{
|
|
|
|
|
DS4ControlSettings dcs = ds4settingsList[i];
|
2015-12-18 07:25:51 +01:00
|
|
|
|
if (dcs.control == dc)
|
|
|
|
|
{
|
|
|
|
|
if (shift)
|
|
|
|
|
dcs.shiftExtras = exts;
|
|
|
|
|
else
|
|
|
|
|
dcs.extras = exts;
|
2017-04-22 09:26:44 +02:00
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
break;
|
|
|
|
|
}
|
2017-04-22 09:26:44 +02:00
|
|
|
|
}
|
2015-12-18 07:25:51 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void UpdateDS4CKeyType(int deviceNum, string buttonName, bool shift, DS4KeyType keyType)
|
|
|
|
|
{
|
|
|
|
|
DS4Controls dc;
|
|
|
|
|
if (buttonName.StartsWith("bn"))
|
|
|
|
|
dc = getDS4ControlsByName(buttonName);
|
|
|
|
|
else
|
|
|
|
|
dc = (DS4Controls)Enum.Parse(typeof(DS4Controls), buttonName, true);
|
2017-04-22 09:26:44 +02:00
|
|
|
|
|
|
|
|
|
//foreach (DS4ControlSettings dcs in ds4settings[deviceNum])
|
|
|
|
|
List<DS4ControlSettings> ds4settingsList = ds4settings[deviceNum];
|
|
|
|
|
for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++)
|
|
|
|
|
{
|
|
|
|
|
DS4ControlSettings dcs = ds4settingsList[i];
|
2015-12-18 07:25:51 +01:00
|
|
|
|
if (dcs.control == dc)
|
|
|
|
|
{
|
|
|
|
|
if (shift)
|
|
|
|
|
dcs.shiftKeyType = keyType;
|
|
|
|
|
else
|
|
|
|
|
dcs.keyType = keyType;
|
2017-04-22 09:26:44 +02:00
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
break;
|
|
|
|
|
}
|
2017-04-22 09:26:44 +02:00
|
|
|
|
}
|
2015-12-18 07:25:51 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public object GetDS4Action(int deviceNum, string buttonName, bool shift)
|
|
|
|
|
{
|
|
|
|
|
DS4Controls dc;
|
|
|
|
|
if (buttonName.StartsWith("bn"))
|
|
|
|
|
dc = getDS4ControlsByName(buttonName);
|
|
|
|
|
else
|
|
|
|
|
dc = (DS4Controls)Enum.Parse(typeof(DS4Controls), buttonName, true);
|
2017-04-22 09:26:44 +02:00
|
|
|
|
|
|
|
|
|
//foreach (DS4ControlSettings dcs in ds4settings[deviceNum])
|
|
|
|
|
List<DS4ControlSettings> ds4settingsList = ds4settings[deviceNum];
|
|
|
|
|
for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++)
|
|
|
|
|
{
|
|
|
|
|
DS4ControlSettings dcs = ds4settingsList[i];
|
2015-12-18 07:25:51 +01:00
|
|
|
|
if (dcs.control == dc)
|
|
|
|
|
{
|
|
|
|
|
if (shift)
|
|
|
|
|
return dcs.shiftAction;
|
|
|
|
|
else
|
|
|
|
|
return dcs.action;
|
|
|
|
|
}
|
2017-04-22 09:26:44 +02:00
|
|
|
|
}
|
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-01 07:42:10 +02:00
|
|
|
|
public object GetDS4Action(int deviceNum, DS4Controls dc, bool shift)
|
|
|
|
|
{
|
|
|
|
|
int temp = (int)dc;
|
|
|
|
|
if (temp > 0)
|
|
|
|
|
{
|
|
|
|
|
int index = temp - 1;
|
|
|
|
|
DS4ControlSettings dcs = ds4settings[deviceNum][index];
|
|
|
|
|
if (shift)
|
|
|
|
|
{
|
|
|
|
|
return dcs.shiftTrigger;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return dcs.action;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
public string GetDS4Extra(int deviceNum, string buttonName, bool shift)
|
|
|
|
|
{
|
|
|
|
|
DS4Controls dc;
|
|
|
|
|
if (buttonName.StartsWith("bn"))
|
|
|
|
|
dc = getDS4ControlsByName(buttonName);
|
|
|
|
|
else
|
|
|
|
|
dc = (DS4Controls)Enum.Parse(typeof(DS4Controls), buttonName, true);
|
2017-04-22 09:26:44 +02:00
|
|
|
|
|
|
|
|
|
//foreach (DS4ControlSettings dcs in ds4settings[deviceNum])
|
|
|
|
|
List<DS4ControlSettings> ds4settingsList = ds4settings[deviceNum];
|
|
|
|
|
for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++)
|
|
|
|
|
{
|
|
|
|
|
DS4ControlSettings dcs = ds4settingsList[i];
|
2015-12-18 07:25:51 +01:00
|
|
|
|
if (dcs.control == dc)
|
|
|
|
|
{
|
|
|
|
|
if (shift)
|
|
|
|
|
return dcs.shiftExtras;
|
|
|
|
|
else
|
|
|
|
|
return dcs.extras;
|
|
|
|
|
}
|
2017-04-22 09:26:44 +02:00
|
|
|
|
}
|
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DS4KeyType GetDS4KeyType(int deviceNum, string buttonName, bool shift)
|
|
|
|
|
{
|
|
|
|
|
DS4Controls dc;
|
|
|
|
|
if (buttonName.StartsWith("bn"))
|
|
|
|
|
dc = getDS4ControlsByName(buttonName);
|
|
|
|
|
else
|
|
|
|
|
dc = (DS4Controls)Enum.Parse(typeof(DS4Controls), buttonName, true);
|
2017-04-22 09:26:44 +02:00
|
|
|
|
|
|
|
|
|
//foreach (DS4ControlSettings dcs in ds4settings[deviceNum])
|
|
|
|
|
List<DS4ControlSettings> ds4settingsList = ds4settings[deviceNum];
|
|
|
|
|
for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++)
|
|
|
|
|
{
|
|
|
|
|
DS4ControlSettings dcs = ds4settingsList[i];
|
2015-12-18 07:25:51 +01:00
|
|
|
|
if (dcs.control == dc)
|
|
|
|
|
{
|
|
|
|
|
if (shift)
|
|
|
|
|
return dcs.shiftKeyType;
|
|
|
|
|
else
|
|
|
|
|
return dcs.keyType;
|
|
|
|
|
}
|
2017-04-22 09:26:44 +02:00
|
|
|
|
}
|
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
return DS4KeyType.None;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int GetDS4STrigger(int deviceNum, string buttonName)
|
|
|
|
|
{
|
|
|
|
|
DS4Controls dc;
|
|
|
|
|
if (buttonName.StartsWith("bn"))
|
|
|
|
|
dc = getDS4ControlsByName(buttonName);
|
|
|
|
|
else
|
|
|
|
|
dc = (DS4Controls)Enum.Parse(typeof(DS4Controls), buttonName, true);
|
2017-04-22 09:26:44 +02:00
|
|
|
|
|
|
|
|
|
//foreach (DS4ControlSettings dcs in ds4settings[deviceNum])
|
|
|
|
|
List<DS4ControlSettings> ds4settingsList = ds4settings[deviceNum];
|
|
|
|
|
for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++)
|
|
|
|
|
{
|
|
|
|
|
DS4ControlSettings dcs = ds4settingsList[i];
|
2015-12-18 07:25:51 +01:00
|
|
|
|
if (dcs.control == dc)
|
2017-04-22 09:26:44 +02:00
|
|
|
|
return dcs.shiftTrigger;
|
|
|
|
|
}
|
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2017-03-30 16:07:04 +02:00
|
|
|
|
public int GetDS4STrigger(int deviceNum, DS4Controls dc)
|
|
|
|
|
{
|
|
|
|
|
int temp = (int)dc;
|
|
|
|
|
if (temp > 0)
|
|
|
|
|
{
|
|
|
|
|
int index = temp - 1;
|
|
|
|
|
DS4ControlSettings dcs = ds4settings[deviceNum][index];
|
|
|
|
|
return dcs.shiftTrigger;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
public DS4ControlSettings getDS4CSetting(int deviceNum, string buttonName)
|
|
|
|
|
{
|
|
|
|
|
DS4Controls dc;
|
|
|
|
|
if (buttonName.StartsWith("bn"))
|
|
|
|
|
dc = getDS4ControlsByName(buttonName);
|
|
|
|
|
else
|
|
|
|
|
dc = (DS4Controls)Enum.Parse(typeof(DS4Controls), buttonName, true);
|
2017-04-22 09:26:44 +02:00
|
|
|
|
|
|
|
|
|
//foreach (DS4ControlSettings dcs in ds4settings[deviceNum])
|
|
|
|
|
List<DS4ControlSettings> ds4settingsList = ds4settings[deviceNum];
|
|
|
|
|
for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++)
|
|
|
|
|
{
|
|
|
|
|
DS4ControlSettings dcs = ds4settingsList[i];
|
2015-12-18 07:25:51 +01:00
|
|
|
|
if (dcs.control == dc)
|
|
|
|
|
return dcs;
|
2017-04-22 09:26:44 +02:00
|
|
|
|
}
|
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
2017-03-30 16:07:04 +02:00
|
|
|
|
public DS4ControlSettings getDS4CSetting(int deviceNum, DS4Controls dc)
|
|
|
|
|
{
|
|
|
|
|
int temp = (int)dc;
|
|
|
|
|
if (temp > 0)
|
|
|
|
|
{
|
|
|
|
|
int index = temp - 1;
|
|
|
|
|
DS4ControlSettings dcs = ds4settings[deviceNum][index];
|
|
|
|
|
return dcs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
public bool HasCustomActions(int deviceNum)
|
|
|
|
|
{
|
2017-04-15 05:11:48 +02:00
|
|
|
|
//foreach (DS4ControlSettings dcs in ds4settings[deviceNum])
|
2017-04-22 09:26:44 +02:00
|
|
|
|
List<DS4ControlSettings> ds4settingsList = ds4settings[deviceNum];
|
|
|
|
|
for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++)
|
2017-04-15 05:11:48 +02:00
|
|
|
|
{
|
2017-04-22 09:26:44 +02:00
|
|
|
|
DS4ControlSettings dcs = ds4settingsList[i];
|
2015-12-18 07:25:51 +01:00
|
|
|
|
if (dcs.action != null || dcs.shiftAction != null)
|
|
|
|
|
return true;
|
2017-04-15 05:11:48 +02:00
|
|
|
|
}
|
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool HasCustomExtras(int deviceNum)
|
|
|
|
|
{
|
2017-04-15 05:11:48 +02:00
|
|
|
|
//foreach (DS4ControlSettings dcs in ds4settings[deviceNum])
|
2017-04-22 09:26:44 +02:00
|
|
|
|
List<DS4ControlSettings> ds4settingsList = ds4settings[deviceNum];
|
|
|
|
|
for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++)
|
2017-04-15 05:11:48 +02:00
|
|
|
|
{
|
2017-04-22 09:26:44 +02:00
|
|
|
|
DS4ControlSettings dcs = ds4settingsList[i];
|
2015-12-18 07:25:51 +01:00
|
|
|
|
if (dcs.extras != null || dcs.shiftExtras != null)
|
|
|
|
|
return true;
|
2017-04-15 05:11:48 +02:00
|
|
|
|
}
|
|
|
|
|
|
2015-12-18 07:25:51 +01:00
|
|
|
|
return false;
|
|
|
|
|
}
|
2014-12-13 21:12:03 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class SpecialAction
|
|
|
|
|
{
|
2017-04-02 02:46:51 +02:00
|
|
|
|
public enum ActionTypeId { None, Key, Program, Profile, Macro, DisconnectBT, BatteryCheck, MultiAction, XboxGameDVR }
|
|
|
|
|
|
2014-12-13 21:12:03 +01:00
|
|
|
|
public string name;
|
|
|
|
|
public List<DS4Controls> trigger = new List<DS4Controls>();
|
|
|
|
|
public string type;
|
2017-04-02 02:46:51 +02:00
|
|
|
|
public ActionTypeId typeID;
|
2014-12-13 21:12:03 +01:00
|
|
|
|
public string controls;
|
|
|
|
|
public List<int> macro = new List<int>();
|
|
|
|
|
public string details;
|
|
|
|
|
public List<DS4Controls> uTrigger = new List<DS4Controls>();
|
|
|
|
|
public string ucontrols;
|
2015-03-15 19:16:01 +01:00
|
|
|
|
public double delayTime = 0;
|
|
|
|
|
public string extra;
|
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
|
|
|
|
public bool pressRelease = false;
|
2014-12-17 19:29:22 +01:00
|
|
|
|
public DS4KeyType keyType;
|
2015-03-15 19:16:01 +01:00
|
|
|
|
public SpecialAction(string name, string controls, string type, string details, double delay = 0, string extras = "")
|
2014-12-13 21:12:03 +01:00
|
|
|
|
{
|
|
|
|
|
this.name = name;
|
|
|
|
|
this.type = type;
|
2017-04-02 02:46:51 +02:00
|
|
|
|
this.typeID = ActionTypeId.None;
|
2014-12-13 21:12:03 +01:00
|
|
|
|
this.controls = controls;
|
2015-03-15 19:16:01 +01:00
|
|
|
|
delayTime = delay;
|
2014-12-13 21:12:03 +01:00
|
|
|
|
string[] ctrls = controls.Split('/');
|
|
|
|
|
foreach (string s in ctrls)
|
|
|
|
|
trigger.Add(getDS4ControlsByName(s));
|
2017-04-02 02:46:51 +02:00
|
|
|
|
|
|
|
|
|
if (type == "Key")
|
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
|
|
|
|
{
|
2017-04-02 02:46:51 +02:00
|
|
|
|
typeID = ActionTypeId.Key;
|
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
|
|
|
|
this.details = details.Split(' ')[0];
|
|
|
|
|
if (!string.IsNullOrEmpty(extras))
|
|
|
|
|
{
|
|
|
|
|
string[] exts = extras.Split('\n');
|
|
|
|
|
pressRelease = exts[0] == "Release";
|
|
|
|
|
this.ucontrols = exts[1];
|
|
|
|
|
string[] uctrls = exts[1].Split('/');
|
|
|
|
|
foreach (string s in uctrls)
|
|
|
|
|
uTrigger.Add(getDS4ControlsByName(s));
|
|
|
|
|
}
|
|
|
|
|
if (details.Contains("Scan Code"))
|
|
|
|
|
keyType |= DS4KeyType.ScanCode;
|
|
|
|
|
}
|
2015-03-15 19:16:01 +01:00
|
|
|
|
else if (type == "Program")
|
|
|
|
|
{
|
2017-04-02 02:46:51 +02:00
|
|
|
|
typeID = ActionTypeId.Program;
|
2015-03-15 19:16:01 +01:00
|
|
|
|
this.details = details;
|
|
|
|
|
if (extras != string.Empty)
|
|
|
|
|
extra = extras;
|
|
|
|
|
}
|
2017-04-02 02:46:51 +02:00
|
|
|
|
else if (type == "Profile")
|
|
|
|
|
{
|
|
|
|
|
typeID = ActionTypeId.Profile;
|
2017-04-07 05:13:39 +02:00
|
|
|
|
this.details = details;
|
|
|
|
|
if (extras != string.Empty)
|
|
|
|
|
{
|
|
|
|
|
extra = extras;
|
|
|
|
|
}
|
2017-04-02 02:46:51 +02:00
|
|
|
|
}
|
|
|
|
|
else if (type == "Macro")
|
|
|
|
|
{
|
|
|
|
|
typeID = ActionTypeId.Macro;
|
|
|
|
|
string[] macs = details.Split('/');
|
|
|
|
|
foreach (string s in macs)
|
|
|
|
|
{
|
|
|
|
|
int v;
|
|
|
|
|
if (int.TryParse(s, out v))
|
|
|
|
|
macro.Add(v);
|
|
|
|
|
}
|
|
|
|
|
if (extras.Contains("Scan Code"))
|
|
|
|
|
keyType |= DS4KeyType.ScanCode;
|
|
|
|
|
}
|
|
|
|
|
else if (type == "DisconnectBT")
|
|
|
|
|
{
|
|
|
|
|
typeID = ActionTypeId.DisconnectBT;
|
|
|
|
|
}
|
|
|
|
|
else if (type == "BatteryCheck")
|
|
|
|
|
{
|
|
|
|
|
typeID = ActionTypeId.BatteryCheck;
|
2017-04-07 03:16:12 +02:00
|
|
|
|
string[] dets = details.Split('|');
|
|
|
|
|
this.details = string.Join(",", dets);
|
2017-04-02 02:46:51 +02:00
|
|
|
|
}
|
|
|
|
|
else if (type == "MultiAction")
|
|
|
|
|
{
|
|
|
|
|
typeID = ActionTypeId.MultiAction;
|
2017-04-07 04:53:12 +02:00
|
|
|
|
this.details = details;
|
2017-04-02 02:46:51 +02:00
|
|
|
|
}
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
else if (type == "XboxGameDVR")
|
|
|
|
|
{
|
2017-04-02 02:46:51 +02:00
|
|
|
|
this.typeID = ActionTypeId.XboxGameDVR;
|
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
|
|
|
|
string[] dets = details.Split(',');
|
|
|
|
|
List<string> macros = new List<string>();
|
|
|
|
|
//string dets = "";
|
|
|
|
|
int typeT = 0;
|
|
|
|
|
for (int i = 0; i < 3; i++)
|
|
|
|
|
{
|
|
|
|
|
if (int.TryParse(dets[i], out typeT))
|
|
|
|
|
{
|
|
|
|
|
switch (typeT)
|
|
|
|
|
{
|
|
|
|
|
case 0: macros.Add("91/71/71/91"); break;
|
|
|
|
|
case 1: macros.Add("91/164/82/82/164/91"); break;
|
|
|
|
|
case 2: macros.Add("91/164/44/44/164/91"); break;
|
|
|
|
|
case 3: macros.Add(dets[3] + "/" + dets[3]); break;
|
|
|
|
|
case 4: macros.Add("91/164/71/71/164/91"); break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.type = "MultiAction";
|
|
|
|
|
type = "MultiAction";
|
|
|
|
|
this.details = string.Join(",", macros);
|
|
|
|
|
}
|
2014-12-13 21:12:03 +01:00
|
|
|
|
else
|
|
|
|
|
this.details = details;
|
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
|
|
|
|
|
|
|
|
|
if (type != "Key" && !string.IsNullOrEmpty(extras))
|
2014-12-13 21:12:03 +01:00
|
|
|
|
{
|
2014-12-17 19:29:22 +01:00
|
|
|
|
this.ucontrols = extras;
|
|
|
|
|
string[] uctrls = extras.Split('/');
|
2014-12-13 21:12:03 +01:00
|
|
|
|
foreach (string s in uctrls)
|
|
|
|
|
uTrigger.Add(getDS4ControlsByName(s));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private DS4Controls getDS4ControlsByName(string key)
|
|
|
|
|
{
|
|
|
|
|
switch (key)
|
|
|
|
|
{
|
|
|
|
|
case "Share": return DS4Controls.Share;
|
|
|
|
|
case "L3": return DS4Controls.L3;
|
|
|
|
|
case "R3": return DS4Controls.R3;
|
|
|
|
|
case "Options": return DS4Controls.Options;
|
|
|
|
|
case "Up": return DS4Controls.DpadUp;
|
|
|
|
|
case "Right": return DS4Controls.DpadRight;
|
|
|
|
|
case "Down": return DS4Controls.DpadDown;
|
|
|
|
|
case "Left": return DS4Controls.DpadLeft;
|
|
|
|
|
|
|
|
|
|
case "L1": return DS4Controls.L1;
|
|
|
|
|
case "R1": return DS4Controls.R1;
|
|
|
|
|
case "Triangle": return DS4Controls.Triangle;
|
|
|
|
|
case "Circle": return DS4Controls.Circle;
|
|
|
|
|
case "Cross": return DS4Controls.Cross;
|
|
|
|
|
case "Square": return DS4Controls.Square;
|
|
|
|
|
|
|
|
|
|
case "PS": return DS4Controls.PS;
|
|
|
|
|
case "Left Stick Left": return DS4Controls.LXNeg;
|
|
|
|
|
case "Left Stick Up": return DS4Controls.LYNeg;
|
|
|
|
|
case "Right Stick Left": return DS4Controls.RXNeg;
|
|
|
|
|
case "Right Stick Up": return DS4Controls.RYNeg;
|
|
|
|
|
|
|
|
|
|
case "Left Stick Right": return DS4Controls.LXPos;
|
|
|
|
|
case "Left Stick Down": return DS4Controls.LYPos;
|
|
|
|
|
case "Right Stick Right": return DS4Controls.RXPos;
|
|
|
|
|
case "Right Stick Down": return DS4Controls.RYPos;
|
|
|
|
|
case "L2": return DS4Controls.L2;
|
|
|
|
|
case "R2": return DS4Controls.R2;
|
|
|
|
|
|
|
|
|
|
case "Left Touch": return DS4Controls.TouchLeft;
|
|
|
|
|
case "Multitouch": return DS4Controls.TouchMulti;
|
|
|
|
|
case "Upper Touch": return DS4Controls.TouchUpper;
|
|
|
|
|
case "Right Touch": return DS4Controls.TouchRight;
|
|
|
|
|
|
|
|
|
|
case "Swipe Up": return DS4Controls.SwipeUp;
|
|
|
|
|
case "Swipe Down": return DS4Controls.SwipeDown;
|
|
|
|
|
case "Swipe Left": return DS4Controls.SwipeLeft;
|
|
|
|
|
case "Swipe Right": return DS4Controls.SwipeRight;
|
2015-02-12 20:36:40 +01:00
|
|
|
|
|
|
|
|
|
case "Tilt Up": return DS4Controls.GyroZNeg;
|
|
|
|
|
case "Tilt Down": return DS4Controls.GyroZPos;
|
|
|
|
|
case "Tilt Left": return DS4Controls.GyroXPos;
|
|
|
|
|
case "Tilt Right": return DS4Controls.GyroXNeg;
|
2014-12-13 21:12:03 +01:00
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
|
|
|
|
}
|