Resolved merge conflict by implementing Ryochan7's changes

This commit is contained in:
Yuki-nyan 2017-11-05 15:20:10 +00:00
commit a9eefa9079
43 changed files with 2824 additions and 2480 deletions

3
.gitignore vendored
View File

@ -154,3 +154,6 @@ $RECYCLE.BIN/
# Mac desktop service store files
.DS_Store
.vs/DS4Windows/*/sqlite3/storage.ide

View File

@ -9,18 +9,24 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}.Debug|x64.ActiveCfg = Debug|x64
{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}.Debug|x64.Build.0 = Debug|x64
{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}.Debug|x86.ActiveCfg = Debug|x86
{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}.Debug|x86.Build.0 = Debug|x86
{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}.Release|Any CPU.Build.0 = Release|Any CPU
{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}.Release|x64.ActiveCfg = Release|x64
{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}.Release|x64.Build.0 = Release|x64
{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}.Release|x86.ActiveCfg = Release|x86
{7B9354BF-AF82-4CCB-A83D-4BEB1E9D8C96}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -24,9 +24,9 @@ namespace DS4Windows
public bool recordingMacro = false;
public event EventHandler<DebugEventArgs> Debug = null;
bool[] buttonsdown = new bool[4] { false, false, false, false };
List<DS4Controls> dcs = new List<DS4Controls>();
bool[] held = new bool[DS4_CONTROLLER_COUNT];
int[] oldmouse = new int[DS4_CONTROLLER_COUNT] { -1, -1, -1, -1 };
Thread tempThread;
//SoundPlayer sp = new SoundPlayer();
private class X360Data
@ -41,18 +41,20 @@ namespace DS4Windows
{
//sp.Stream = Properties.Resources.EE;
// Cause thread affinity to not be tied to main GUI thread
Thread x360Thread = new Thread(() => { x360Bus = new X360Device(); });
x360Thread.IsBackground = true;
x360Thread.Priority = ThreadPriority.Normal;
x360Thread.Name = "SCP Virtual Bus Thread";
x360Thread.Start();
while (!x360Thread.ThreadState.HasFlag(ThreadState.Stopped))
/*Task x360task = new Task(() => { Thread.CurrentThread.Priority = ThreadPriority.AboveNormal; x360Bus = new X360Device(); });
x360task.Start();
while (!x360task.IsCompleted)
Thread.SpinWait(500);
*/
tempThread = new Thread(() => { x360Bus = new X360Device(); });
tempThread.Priority = ThreadPriority.AboveNormal;
tempThread.IsBackground = true;
tempThread.Start();
while (tempThread.IsAlive)
{
Thread.SpinWait(500);
}
AddtoDS4List();
for (int i = 0, arlength = DS4Controllers.Length; i < arlength; i++)
{
processingData[i] = new X360Data();
@ -63,44 +65,10 @@ namespace DS4Windows
}
}
void AddtoDS4List()
{
dcs.Add(DS4Controls.Cross);
dcs.Add(DS4Controls.Circle);
dcs.Add(DS4Controls.Square);
dcs.Add(DS4Controls.Triangle);
dcs.Add(DS4Controls.Options);
dcs.Add(DS4Controls.Share);
dcs.Add(DS4Controls.DpadUp);
dcs.Add(DS4Controls.DpadDown);
dcs.Add(DS4Controls.DpadLeft);
dcs.Add(DS4Controls.DpadRight);
dcs.Add(DS4Controls.PS);
dcs.Add(DS4Controls.L1);
dcs.Add(DS4Controls.R1);
dcs.Add(DS4Controls.L2);
dcs.Add(DS4Controls.R2);
dcs.Add(DS4Controls.L3);
dcs.Add(DS4Controls.R3);
dcs.Add(DS4Controls.LXPos);
dcs.Add(DS4Controls.LXNeg);
dcs.Add(DS4Controls.LYPos);
dcs.Add(DS4Controls.LYNeg);
dcs.Add(DS4Controls.RXPos);
dcs.Add(DS4Controls.RXNeg);
dcs.Add(DS4Controls.RYPos);
dcs.Add(DS4Controls.RYNeg);
dcs.Add(DS4Controls.SwipeUp);
dcs.Add(DS4Controls.SwipeDown);
dcs.Add(DS4Controls.SwipeLeft);
dcs.Add(DS4Controls.SwipeRight);
}
private async void WarnExclusiveModeFailure(DS4Device device)
private void WarnExclusiveModeFailure(DS4Device device)
{
if (DS4Devices.isExclusiveMode && !device.isExclusive())
{
await Task.Delay(5);
string message = Properties.Resources.CouldNotOpenDS4.Replace("*Mac address*", device.getMacAddress()) + " " +
Properties.Resources.QuitOtherPrograms;
LogDebug(message, true);
@ -108,7 +76,7 @@ namespace DS4Windows
}
}
public bool Start(bool showlog = true)
public bool Start(object tempui, bool showlog = true)
{
if (x360Bus.Open() && x360Bus.Start())
{
@ -138,14 +106,25 @@ namespace DS4Windows
if (showlog)
LogDebug(Properties.Resources.FoundController + device.getMacAddress() + " (" + device.getConnectionType() + ")");
WarnExclusiveModeFailure(device);
Task task = new Task(() => { Thread.Sleep(5); WarnExclusiveModeFailure(device); });
task.Start();
DS4Controllers[i] = device;
device.setUiContext(SynchronizationContext.Current);
device.setUiContext(tempui as SynchronizationContext);
device.Removal += this.On_DS4Removal;
device.Removal += DS4Devices.On_Removal;
device.SyncChange += this.On_SyncChange;
device.SyncChange += DS4Devices.UpdateSerial;
device.SerialChange += this.On_SerialChange;
if (device.isValidSerial() && containsLinkedProfile(device.getMacAddress()))
{
ProfilePath[i] = getLinkedProfile(device.getMacAddress());
}
else
{
ProfilePath[i] = OlderProfilePath[i];
}
LoadProfile(i, false, this, false, false);
touchPad[i] = new Mouse(i, device);
device.LightBarColor = getMainColor(i);
@ -208,7 +187,6 @@ namespace DS4Windows
}
runHotPlug = true;
return true;
}
@ -222,6 +200,8 @@ namespace DS4Windows
if (showlog)
LogDebug(Properties.Resources.StoppingX360);
LogDebug("Closing connection to Scp Virtual Bus");
bool anyUnplugged = false;
for (int i = 0, arlength = DS4Controllers.Length; i < arlength; i++)
{
@ -246,8 +226,7 @@ namespace DS4Windows
DS4LightBar.forcelight[i] = false;
DS4LightBar.forcedFlash[i] = 0;
DS4LightBar.defaultLight = true;
DS4LightBar.updateLightBar(DS4Controllers[i], i, CurrentState[i],
ExposedState[i], touchPad[i]);
DS4LightBar.updateLightBar(DS4Controllers[i], i);
tempDevice.IsRemoved = true;
Thread.Sleep(50);
}
@ -315,7 +294,8 @@ namespace DS4Windows
if (DS4Controllers[Index] == null)
{
LogDebug(Properties.Resources.FoundController + device.getMacAddress() + " (" + device.getConnectionType() + ")");
WarnExclusiveModeFailure(device);
Task task = new Task(() => { Thread.Sleep(5); WarnExclusiveModeFailure(device); });
task.Start();
DS4Controllers[Index] = device;
device.setUiContext(uiContext);
device.Removal += this.On_DS4Removal;
@ -323,6 +303,16 @@ namespace DS4Windows
device.SyncChange += this.On_SyncChange;
device.SyncChange += DS4Devices.UpdateSerial;
device.SerialChange += this.On_SerialChange;
if (device.isValidSerial() && containsLinkedProfile(device.getMacAddress()))
{
ProfilePath[i] = getLinkedProfile(device.getMacAddress());
}
else
{
ProfilePath[i] = OlderProfilePath[i];
}
LoadProfile(i, false, this, false, false);
touchPad[Index] = new Mouse(Index, device);
device.LightBarColor = getMainColor(Index);
device.Report += this.On_Report;
@ -695,6 +685,7 @@ namespace DS4Windows
public bool[] inWarnMonitor = new bool[4] { false, false, false, false };
private byte[] currentBattery = new byte[4] { 0, 0, 0, 0 };
private bool[] charging = new bool[4] { false, false, false, false };
private string[] tempStrings = new string[4] { string.Empty, string.Empty, string.Empty, string.Empty };
// Called every time a new input report has arrived
protected virtual void On_Report(object sender, EventArgs e)
@ -714,9 +705,13 @@ namespace DS4Windows
if (getFlushHIDQueue(ind))
device.FlushHID();
if (!string.IsNullOrEmpty(device.error))
string devError = tempStrings[ind] = device.error;
if (!string.IsNullOrEmpty(devError))
{
LogDebug(device.error);
device.getUiContext()?.Post(new SendOrPostCallback(delegate (object state)
{
LogDebug(devError);
}), null);
}
if (inWarnMonitor[ind])
@ -749,12 +744,13 @@ namespace DS4Windows
device.getCurrentState(CurrentState[ind]);
DS4State cState = CurrentState[ind];
device.getPreviousState(PreviousState[ind]);
DS4State pState = PreviousState[ind];
DS4State pState = device.getPreviousStateRef();
//device.getPreviousState(PreviousState[ind]);
//DS4State pState = PreviousState[ind];
if (!device.firstReport && device.IsAlive())
if (device.firstReport && device.IsAlive())
{
device.firstReport = true;
device.firstReport = false;
device.getUiContext()?.Post(new SendOrPostCallback(delegate (object state)
{
OnDeviceStatusChanged(this, ind);
@ -771,9 +767,7 @@ namespace DS4Windows
}
if (getEnableTouchToggle(ind))
{
CheckForTouchToggle(ind, cState, pState);
}
cState = Mapping.SetCurveAndDeadzone(ind, cState);
@ -806,7 +800,7 @@ namespace DS4Windows
Mapping.Commit(ind);
// Update the GUI/whatever.
DS4LightBar.updateLightBar(device, ind, cState, ExposedState[ind], touchPad[ind]);
DS4LightBar.updateLightBar(device, ind);
}
}
@ -833,131 +827,73 @@ namespace DS4Windows
}
}
public string GetInputkeys(int ind)
public DS4Controls GetActiveInputControl(int ind)
{
DS4State cState = CurrentState[ind];
DS4StateExposed eState = ExposedState[ind];
Mouse tp = touchPad[ind];
string result = "nothing";
DS4Controls result = DS4Controls.None;
if (DS4Controllers[ind] != null)
{
if (Mapping.getBoolButtonMapping(cState.Cross))
{
result = "Cross";
}
result = DS4Controls.Cross;
else if (Mapping.getBoolButtonMapping(cState.Circle))
{
result = "Circle";
}
result = DS4Controls.Circle;
else if (Mapping.getBoolButtonMapping(cState.Triangle))
{
result = "Triangle";
}
result = DS4Controls.Triangle;
else if (Mapping.getBoolButtonMapping(cState.Square))
{
result = "Square";
}
result = DS4Controls.Square;
else if (Mapping.getBoolButtonMapping(cState.L1))
{
result = "L1";
}
result = DS4Controls.L1;
else if (Mapping.getBoolTriggerMapping(cState.L2))
{
result = "L2";
}
result = DS4Controls.L2;
else if (Mapping.getBoolButtonMapping(cState.L3))
{
result = "L3";
}
result = DS4Controls.L3;
else if (Mapping.getBoolButtonMapping(cState.R1))
{
result = "R1";
}
result = DS4Controls.R1;
else if (Mapping.getBoolTriggerMapping(cState.R2))
{
result = "R2";
}
result = DS4Controls.R2;
else if (Mapping.getBoolButtonMapping(cState.R3))
{
result = "R3";
}
result = DS4Controls.R3;
else if (Mapping.getBoolButtonMapping(cState.DpadUp))
{
result = "Up";
}
result = DS4Controls.DpadUp;
else if (Mapping.getBoolButtonMapping(cState.DpadDown))
{
result = "Down";
}
result = DS4Controls.DpadDown;
else if (Mapping.getBoolButtonMapping(cState.DpadLeft))
{
result = "Left";
}
result = DS4Controls.DpadLeft;
else if (Mapping.getBoolButtonMapping(cState.DpadRight))
{
result = "Right";
}
result = DS4Controls.DpadRight;
else if (Mapping.getBoolButtonMapping(cState.Share))
{
result = "Share";
}
result = DS4Controls.Share;
else if (Mapping.getBoolButtonMapping(cState.Options))
{
result = "Options";
}
result = DS4Controls.Options;
else if (Mapping.getBoolButtonMapping(cState.PS))
{
result = "PS";
}
result = DS4Controls.PS;
else if (Mapping.getBoolAxisDirMapping(cState.LX, true))
{
result = "LS Right";
}
result = DS4Controls.LXPos;
else if (Mapping.getBoolAxisDirMapping(cState.LX, false))
{
result = "LS Left";
}
result = DS4Controls.LXNeg;
else if (Mapping.getBoolAxisDirMapping(cState.LY, true))
{
result = "LS Down";
}
result = DS4Controls.LYPos;
else if (Mapping.getBoolAxisDirMapping(cState.LY, false))
{
result = "LS Up";
}
result = DS4Controls.LYNeg;
else if (Mapping.getBoolAxisDirMapping(cState.RX, true))
{
result = "RS Right";
}
result = DS4Controls.RXPos;
else if (Mapping.getBoolAxisDirMapping(cState.RX, false))
{
result = "RS Left";
}
result = DS4Controls.RXNeg;
else if (Mapping.getBoolAxisDirMapping(cState.RY, true))
{
result = "RS Down";
}
result = DS4Controls.RYPos;
else if (Mapping.getBoolAxisDirMapping(cState.RY, false))
{
result = "RS Up";
}
result = DS4Controls.RYNeg;
else if (Mapping.getBoolTouchMapping(tp.leftDown))
{
result = "Touch Left";
}
result = DS4Controls.TouchLeft;
else if (Mapping.getBoolTouchMapping(tp.rightDown))
{
result = "Touch Right";
}
result = DS4Controls.TouchRight;
else if (Mapping.getBoolTouchMapping(tp.multiDown))
{
result = "Touch Multi";
}
result = DS4Controls.TouchMulti;
else if (Mapping.getBoolTouchMapping(tp.upperDown))
{
result = "Touch Upper";
}
result = DS4Controls.TouchUpper;
}
return result;
@ -979,20 +915,16 @@ namespace DS4Windows
oldscrollvalue[deviceID] = getScrollSensitivity(deviceID);
getTouchSensitivity()[deviceID] = 0;
getScrollSensitivity()[deviceID] = 0;
LogDebug(getTouchSensitivity(deviceID) > 0 ? Properties.Resources.TouchpadMovementOn :
Properties.Resources.TouchpadMovementOff);
Log.LogToTray(getTouchSensitivity(deviceID) > 0 ? Properties.Resources.TouchpadMovementOn :
Properties.Resources.TouchpadMovementOff);
LogDebug(Properties.Resources.TouchpadMovementOff);
Log.LogToTray(Properties.Resources.TouchpadMovementOff);
touchreleased[deviceID] = false;
}
else if (touchreleased[deviceID])
{
getTouchSensitivity()[deviceID] = oldtouchvalue[deviceID];
getScrollSensitivity()[deviceID] = oldscrollvalue[deviceID];
LogDebug(getTouchSensitivity(deviceID) > 0 ? Properties.Resources.TouchpadMovementOn :
Properties.Resources.TouchpadMovementOff);
Log.LogToTray(getTouchSensitivity(deviceID) > 0 ? Properties.Resources.TouchpadMovementOn :
Properties.Resources.TouchpadMovementOff);
LogDebug(Properties.Resources.TouchpadMovementOn);
Log.LogToTray(Properties.Resources.TouchpadMovementOn);
touchreleased[deviceID] = false;
}
}

View File

@ -34,10 +34,11 @@ namespace DS4Windows
public static DS4Color[] forcedColor = new DS4Color[4];
public static byte[] forcedFlash = new byte[4];
internal const int PULSE_FLASH_DURATION = 2000;
internal const double PULSE_FLASH_SEGMENTS = PULSE_FLASH_DURATION / 40;
internal const int PULSE_CHARGING_DURATION = 4000;
internal const double PULSE_CHARGING_SEGMENTS = PULSE_CHARGING_DURATION / 40;
public static void updateLightBar(DS4Device device, int deviceNum, DS4State cState,
DS4StateExposed eState, Mouse tp)
public static void updateLightBar(DS4Device device, int deviceNum)
{
DS4Color color;
if (!defaultLight && !forcelight[deviceNum])
@ -82,13 +83,9 @@ namespace DS4Windows
}
else if (getLedAsBatteryIndicator(deviceNum))
{
//if (device.Charging == false || device.Battery >= 100) // when charged, don't show the charging animation
{
DS4Color fullColor = getMainColor(deviceNum);
DS4Color lowColor = getLowColor(deviceNum);
color = getTransitionedColor(lowColor, fullColor, device.getBattery());
}
DS4Color fullColor = getMainColor(deviceNum);
DS4Color lowColor = getLowColor(deviceNum);
color = getTransitionedColor(lowColor, fullColor, device.getBattery());
}
else
{
@ -123,7 +120,8 @@ namespace DS4Windows
{
if (elapsed < PULSE_FLASH_DURATION)
{
ratio = 100.0 * (elapsed / (double)PULSE_FLASH_DURATION);
elapsed = elapsed / 40;
ratio = 100.0 * (elapsed / PULSE_FLASH_SEGMENTS);
}
else
{
@ -135,7 +133,8 @@ namespace DS4Windows
{
if (elapsed < PULSE_FLASH_DURATION)
{
ratio = (0 - 100.0) * (elapsed / (double)PULSE_FLASH_DURATION) + 100.0;
elapsed = elapsed / 40;
ratio = (0 - 100.0) * (elapsed / PULSE_FLASH_SEGMENTS) + 100.0;
}
else
{
@ -157,9 +156,12 @@ namespace DS4Windows
TimeSpan timeratio = new TimeSpan(DateTime.UtcNow.Ticks - device.lastActive.Ticks);
double botratio = timeratio.TotalMilliseconds;
double topratio = TimeSpan.FromSeconds(idleDisconnectTimeout).TotalMilliseconds;
double ratio = 100.0 * (botratio / topratio);
double ratio = 100.0 * (botratio / topratio), elapsed = ratio;
if (ratio >= 50.0 && ratio < 100.0)
color = getTransitionedColor(color, new DS4Color(0, 0, 0), (uint)((ratio - 50) * 2));
{
color = getTransitionedColor(color, new DS4Color(0, 0, 0),
(uint)(-100.0 * (elapsed = 0.02 * (ratio - 50.0)) * (elapsed - 2.0)));
}
else if (ratio >= 100.0)
color = getTransitionedColor(color, new DS4Color(0, 0, 0), 100.0);
}
@ -187,7 +189,8 @@ namespace DS4Windows
{
if (elapsed < PULSE_CHARGING_DURATION)
{
ratio = 100.0 * (elapsed / (double)PULSE_CHARGING_DURATION);
elapsed = elapsed / 40;
ratio = 100.0 * (elapsed / PULSE_CHARGING_SEGMENTS);
}
else
{
@ -199,7 +202,8 @@ namespace DS4Windows
{
if (elapsed < PULSE_CHARGING_DURATION)
{
ratio = (0 - 100.0) * (elapsed / (double)PULSE_CHARGING_DURATION) + 100.0;
elapsed = elapsed / 40;
ratio = (0 - 100.0) * (elapsed / PULSE_CHARGING_SEGMENTS) + 100.0;
}
else
{

View File

@ -12,7 +12,7 @@ namespace DS4Windows
public byte[] swipedirs = new byte[(int)DS4Controls.SwipeDown + 1];
public bool[] swipedirbools = new bool[(int)DS4Controls.SwipeDown + 1];
public static ControlType[] mappedType = { ControlType.Unknown, // DS4Controls.None
public static ControlType[] mappedType = new ControlType[38] { ControlType.Unknown, // DS4Controls.None
ControlType.AxisDir, // DS4Controls.LXNeg
ControlType.AxisDir, // DS4Controls.LXPos
ControlType.AxisDir, // DS4Controls.LYNeg
@ -90,11 +90,11 @@ namespace DS4Windows
buttons[(int)DS4Controls.TouchUpper] = tp != null ? (!priorMouse ? tp.upperDown : tp.priorUpperDown) : false;
buttons[(int)DS4Controls.TouchMulti] = tp != null ? (!priorMouse ? tp.multiDown : tp.priorMultiDown) : false;
int sixAxisX = -exposeState.getAccelX();
int sixAxisX = -exposeState.getOutputAccelX();
gryodirs[(int)DS4Controls.GyroXPos] = sixAxisX > 0 ? sixAxisX : 0;
gryodirs[(int)DS4Controls.GyroXNeg] = sixAxisX < 0 ? sixAxisX : 0;
int sixAxisZ = exposeState.getAccelZ();
int sixAxisZ = exposeState.getOutputAccelZ();
gryodirs[(int)DS4Controls.GyroZPos] = sixAxisZ > 0 ? sixAxisZ : 0;
gryodirs[(int)DS4Controls.GyroZNeg] = sixAxisZ < 0 ? sixAxisZ : 0;

View File

@ -84,14 +84,14 @@ namespace DS4Windows
public static DateTime[] oldnowKeyAct = new DateTime[4] { DateTime.MinValue,
DateTime.MinValue, DateTime.MinValue, DateTime.MinValue };
private static DS4Controls[] shiftTriggerMapping = { DS4Controls.None, DS4Controls.Cross, DS4Controls.Circle, DS4Controls.Square,
private static DS4Controls[] shiftTriggerMapping = new DS4Controls[26] { DS4Controls.None, DS4Controls.Cross, DS4Controls.Circle, DS4Controls.Square,
DS4Controls.Triangle, DS4Controls.Options, DS4Controls.Share, DS4Controls.DpadUp, DS4Controls.DpadDown,
DS4Controls.DpadLeft, DS4Controls.DpadRight, DS4Controls.PS, DS4Controls.L1, DS4Controls.R1, DS4Controls.L2,
DS4Controls.R2, DS4Controls.L3, DS4Controls.R3, DS4Controls.TouchLeft, DS4Controls.TouchUpper, DS4Controls.TouchMulti,
DS4Controls.TouchRight, DS4Controls.GyroZNeg, DS4Controls.GyroZPos, DS4Controls.GyroXPos, DS4Controls.GyroXNeg
DS4Controls.TouchRight, DS4Controls.GyroZNeg, DS4Controls.GyroZPos, DS4Controls.GyroXPos, DS4Controls.GyroXNeg,
};
private static int[] ds4ControlMapping = { 0, // DS4Control.None
private static int[] ds4ControlMapping = new int[34] { 0, // DS4Control.None
16, // DS4Controls.LXNeg
20, // DS4Controls.LXPos
17, // DS4Controls.LYNeg
@ -145,8 +145,8 @@ namespace DS4Windows
public static int mouseaccel = 0;
public static int prevmouseaccel = 0;
private static double horizontalRemainder = 0.0, verticalRemainder = 0.0;
private const int MOUSESPEEDFACTOR = 40;
private const double MOUSESTICKOFFSET = 0.03;
private const int MOUSESPEEDFACTOR = 30;
private const double MOUSESTICKOFFSET = 0.032;
public static void Commit(int device)
{
@ -219,18 +219,18 @@ namespace DS4Windows
if (globalState.currentClicks.wUpCount != 0 && globalState.previousClicks.wUpCount == 0)
{
InputMethods.MouseEvent(InputMethods.MOUSEEVENTF_WHEEL, 100);
InputMethods.MouseEvent(InputMethods.MOUSEEVENTF_WHEEL, 120);
oldnow = DateTime.UtcNow;
wheel = 100;
wheel = 120;
}
else if (globalState.currentClicks.wUpCount == 0 && globalState.previousClicks.wUpCount != 0)
wheel = 0;
if (globalState.currentClicks.wDownCount != 0 && globalState.previousClicks.wDownCount == 0)
{
InputMethods.MouseEvent(InputMethods.MOUSEEVENTF_WHEEL, -100);
InputMethods.MouseEvent(InputMethods.MOUSEEVENTF_WHEEL, -120);
oldnow = DateTime.UtcNow;
wheel = -100;
wheel = -120;
}
if (globalState.currentClicks.wDownCount == 0 && globalState.previousClicks.wDownCount != 0)
wheel = 0;
@ -914,17 +914,17 @@ namespace DS4Windows
if (absx > SXD)
{
double ratioX = absx < maxValue ? (absx - SXD) / (double)(maxValue - SXD) : 1.0;
dState.Motion.accelX = Math.Sign(gyroX) *
dState.Motion.outputAccelX = Math.Sign(gyroX) *
(int)Math.Min(128d, sxsens * 128d * ((1.0 - sxAntiDead) * ratioX + sxAntiDead));
}
else
{
dState.Motion.accelX = 0;
dState.Motion.outputAccelX = 0;
}
}
else
{
dState.Motion.accelX = Math.Sign(gyroX) *
dState.Motion.outputAccelX = Math.Sign(gyroX) *
(int)Math.Min(128d, sxsens * 128d * (absx / 128d));
}
@ -934,51 +934,51 @@ namespace DS4Windows
if (absz > SZD)
{
double ratioZ = absz < maxValue ? (absz - SZD) / (double)(maxValue - SZD) : 1.0;
dState.Motion.accelZ = Math.Sign(gyroZ) *
dState.Motion.outputAccelZ = Math.Sign(gyroZ) *
(int)Math.Min(128d, szsens * 128d * ((1.0 - szAntiDead) * ratioZ + szAntiDead));
}
else
{
dState.Motion.accelZ = 0;
dState.Motion.outputAccelZ = 0;
}
}
else
{
dState.Motion.accelZ = Math.Sign(gyroZ) *
dState.Motion.outputAccelZ = Math.Sign(gyroZ) *
(int)Math.Min(128d, szsens * 128d * (absz / 128d));
}
int sxOutCurveMode = tempIntArray[device] = getSXOutCurveMode(device);
if (sxOutCurveMode > 0)
{
double temp = Math.Abs(dState.Motion.accelX) / 128.0;
double temp = Math.Abs(dState.Motion.outputAccelX) / 128.0;
double sign = Math.Sign(temp);
if (sxOutCurveMode == 1)
{
double output = temp * temp;
dState.Motion.accelX = (byte)(output * sign * 128.0);
dState.Motion.outputAccelX = (byte)(output * sign * 128.0);
}
else if (sxOutCurveMode == 2)
{
double output = temp * temp * temp;
dState.Motion.accelX = (byte)(output * 128.0);
dState.Motion.outputAccelX = (byte)(output * 128.0);
}
}
int szOutCurveMode = tempIntArray[device] = getSZOutCurveMode(device);
if (szOutCurveMode > 0)
{
double temp = Math.Abs(dState.Motion.accelZ) / 128.0;
double temp = Math.Abs(dState.Motion.outputAccelZ) / 128.0;
double sign = Math.Sign(temp);
if (szOutCurveMode == 1)
{
double output = temp * temp;
dState.Motion.accelZ = (byte)(output * sign * 128.0);
dState.Motion.outputAccelZ = (byte)(output * sign * 128.0);
}
else if (szOutCurveMode == 2)
{
double output = temp * temp * temp;
dState.Motion.accelZ = (byte)(output * 128.0);
dState.Motion.outputAccelZ = (byte)(output * 128.0);
}
}
}
@ -1010,11 +1010,15 @@ namespace DS4Windows
{
result = false;
}
else
else if (trigger < 26)
{
DS4Controls ds = shiftTriggerMapping[trigger];
result = getBoolMapping2(device, ds, cState, eState, tp, fieldMapping);
}
else if (trigger == 26)
{
result = cState.Touch1Finger;
}
return result;
}
@ -1127,6 +1131,64 @@ namespace DS4Windows
keyType = dcs.keyType;
}
if (usingExtra == DS4Controls.None || usingExtra == dcs.control)
{
bool shiftE = !string.IsNullOrEmpty(dcs.shiftExtras) && ShiftTrigger2(dcs.shiftTrigger, device, cState, eState, tp, fieldMapping);
bool regE = !string.IsNullOrEmpty(dcs.extras);
if ((regE || shiftE) && getBoolActionMapping2(device, dcs.control, cState, eState, tp, fieldMapping))
{
usingExtra = dcs.control;
string p;
if (shiftE)
p = dcs.shiftExtras;
else
p = dcs.extras;
string[] extraS = p.Split(',');
int extrasSLen = extraS.Length;
int[] extras = new int[extrasSLen];
for (int i = 0; i < extrasSLen; i++)
{
int b;
if (int.TryParse(extraS[i], out b))
extras[i] = b;
}
held[device] = true;
try
{
if (!(extras[0] == extras[1] && extras[1] == 0))
ctrl.setRumble((byte)extras[0], (byte)extras[1], device);
if (extras[2] == 1)
{
DS4Color color = new DS4Color { red = (byte)extras[3], green = (byte)extras[4], blue = (byte)extras[5] };
DS4LightBar.forcedColor[device] = color;
DS4LightBar.forcedFlash[device] = (byte)extras[6];
DS4LightBar.forcelight[device] = true;
}
if (extras[7] == 1)
{
if (oldmouse[device] == -1)
oldmouse[device] = ButtonMouseSensitivity[device];
ButtonMouseSensitivity[device] = extras[8];
}
}
catch { }
}
else if ((regE || shiftE) && held[device])
{
DS4LightBar.forcelight[device] = false;
DS4LightBar.forcedFlash[device] = 0;
ButtonMouseSensitivity[device] = oldmouse[device];
oldmouse[device] = -1;
ctrl.setRumble(0, 0, device);
held[device] = false;
usingExtra = DS4Controls.None;
}
}
if (action != null)
{
if (actionType == DS4ControlSettings.ActionType.Macro)
@ -1351,64 +1413,6 @@ namespace DS4Windows
resetToDefaultValue2(dcs.control, MappedState, outputfieldMapping);
}
}
if (usingExtra == DS4Controls.None || usingExtra == dcs.control)
{
bool shiftE = !string.IsNullOrEmpty(dcs.shiftExtras) && dcs.shiftExtras != "0,0,0,0,0,0,0,0" && ShiftTrigger2(dcs.shiftTrigger, device, cState, eState, tp, fieldMapping);
bool regE = !string.IsNullOrEmpty(dcs.extras) && dcs.extras != "0,0,0,0,0,0,0,0";
if ((regE || shiftE) && getBoolActionMapping2(device, dcs.control, cState, eState, tp, fieldMapping))
{
usingExtra = dcs.control;
string p;
if (shiftE)
p = dcs.shiftExtras;
else
p = dcs.extras;
string[] extraS = p.Split(',');
int extrasSLen = extraS.Length;
int[] extras = new int[extrasSLen];
for (int i = 0; i < extrasSLen; i++)
{
int b;
if (int.TryParse(extraS[i], out b))
extras[i] = b;
}
held[device] = true;
try
{
if (!(extras[0] == extras[1] && extras[1] == 0))
ctrl.setRumble((byte)extras[0], (byte)extras[1], device);
if (extras[2] == 1)
{
DS4Color color = new DS4Color { red = (byte)extras[3], green = (byte)extras[4], blue = (byte)extras[5] };
DS4LightBar.forcedColor[device] = color;
DS4LightBar.forcedFlash[device] = (byte)extras[6];
DS4LightBar.forcelight[device] = true;
}
if (extras[7] == 1)
{
if (oldmouse[device] == -1)
oldmouse[device] = ButtonMouseSensitivity[device];
ButtonMouseSensitivity[device] = extras[8];
}
}
catch { }
}
else if ((regE || shiftE) && held[device])
{
DS4LightBar.forcelight[device] = false;
DS4LightBar.forcedFlash[device] = 0;
ButtonMouseSensitivity[device] = oldmouse[device];
oldmouse[device] = -1;
ctrl.setRumble(0, 0, device);
held[device] = false;
usingExtra = DS4Controls.None;
}
}
}
outputfieldMapping.populateState(MappedState);
@ -1985,7 +1989,7 @@ namespace DS4Windows
DS4Device d = ctrl.DS4Controllers[device];
//cus
DS4State tempPrevState = d.getPreviousState();
DS4State tempPrevState = d.getPreviousStateRef();
// Only create one instance of previous DS4StateFieldMapping in case more than one multi-action
// button is assigned
if (previousFieldMapping == null)
@ -1999,7 +2003,7 @@ namespace DS4Windows
{
// pressed down
action.pastTime = DateTime.UtcNow;
if (action.pastTime <= (action.firstTap + TimeSpan.FromMilliseconds(150)))
if (action.pastTime <= (action.firstTap + TimeSpan.FromMilliseconds(100)))
{
action.tappedOnce = tappedOnce = false;
action.secondtouchbegin = secondtouchbegin = true;
@ -2024,7 +2028,7 @@ namespace DS4Windows
{
action.firstTouch = firstTouch = false;
//firstTouch = false;
if (DateTime.UtcNow <= (action.pastTime + TimeSpan.FromMilliseconds(200)) && !tappedOnce)
if (DateTime.UtcNow <= (action.pastTime + TimeSpan.FromMilliseconds(150)) && !tappedOnce)
{
action.tappedOnce = tappedOnce = true;
//tappedOnce = true;
@ -2064,7 +2068,7 @@ namespace DS4Windows
}
//if it fails the method resets, and tries again with a new tester value (gives tap a delay so tap and hold can work)
}
else if (firstTouch && (DateTime.UtcNow - action.pastTime) > TimeSpan.FromMilliseconds(1000)) //helddown
else if (firstTouch && (DateTime.UtcNow - action.pastTime) > TimeSpan.FromMilliseconds(500)) //helddown
{
if (action.typeID == SpecialAction.ActionTypeId.MultiAction)
{

View File

@ -39,6 +39,8 @@ namespace DS4Windows
{
if (Global.isUsingSAforMouse(deviceNum) && Global.getGyroSensitivity(deviceNum) > 0)
{
s = dev.getCurrentStateRef();
triggeractivated = true;
useReverseRatchet = Global.getGyroTriggerTurns(deviceNum);
int i = 0;
@ -46,8 +48,8 @@ namespace DS4Windows
if (!string.IsNullOrEmpty(ss[0]))
{
string s = string.Empty;
for (int index = 0, arlen = ss.Length; triggeractivated && index < arlen; index++)
//foreach (string s in ss)
for (int index = 0, arlen = ss.Length;
triggeractivated && index < arlen; index++)
{
s = ss[index];
if (!(int.TryParse(s, out i) && getDS4ControlsByName(i)))
@ -63,8 +65,6 @@ namespace DS4Windows
cursor.sixaxisMoved(arg);
else
cursor.mouseRemainderReset();
dev.getCurrentState(s);
}
}
@ -98,11 +98,22 @@ namespace DS4Windows
return false;
}
private bool tempBool = false;
public virtual void touchesMoved(object sender, TouchpadEventArgs arg)
{
if (!Global.UseTPforControls[deviceNum])
s = dev.getCurrentStateRef();
if (Global.getUseTPforControls(deviceNum) == false)
{
cursor.touchesMoved(arg, dragging || dragging2);
int[] disArray = Global.getTouchDisInvertTriggers(deviceNum);
tempBool = true;
for (int i = 0, arlen = disArray.Length; tempBool && i < arlen; i++)
{
if (getDS4ControlsByName(disArray[i]) == false)
tempBool = false;
}
cursor.touchesMoved(arg, dragging || dragging2, tempBool);
wheel.touchesMoved(arg, dragging || dragging2);
}
else
@ -129,7 +140,6 @@ namespace DS4Windows
slideleft = true;
}
dev.getCurrentState(s);
synthesizeMouseButtons();
}
@ -151,7 +161,7 @@ namespace DS4Windows
secondtouchbegin = true;
}
dev.getCurrentState(s);
s = dev.getCurrentStateRef();
synthesizeMouseButtons();
}
@ -186,7 +196,7 @@ namespace DS4Windows
}
}
dev.getCurrentState(s);
s = dev.getCurrentStateRef();
synthesizeMouseButtons();
}
@ -202,8 +212,7 @@ namespace DS4Windows
public virtual void touchUnchanged(object sender, EventArgs unused)
{
dev.getCurrentState(s);
//if (s.Touch1 || s.Touch2 || s.TouchButton)
s = dev.getCurrentStateRef();
synthesizeMouseButtons();
}
@ -254,7 +263,6 @@ namespace DS4Windows
}
s = remapped;
//remapped.CopyTo(s);
}
public virtual void touchButtonUp(object sender, TouchpadEventArgs arg)
@ -262,7 +270,7 @@ namespace DS4Windows
pushed = DS4Controls.None;
upperDown = leftDown = rightDown = multiDown = false;
dev.setRumble(0, 0);
dev.getCurrentState(s);
s = dev.getCurrentStateRef();
if (s.Touch1 || s.Touch2)
synthesizeMouseButtons();
}
@ -284,7 +292,7 @@ namespace DS4Windows
rightDown = true;
}
dev.getCurrentState(s);
s = dev.getCurrentStateRef();
synthesizeMouseButtons();
}

View File

@ -1,4 +1,5 @@

using System;
namespace DS4Windows
{
class MouseCursor
@ -19,10 +20,11 @@ namespace DS4Windows
verticalDirection = Direction.Neutral;
private Direction hDirection = Direction.Neutral, vDirection = Direction.Neutral;
private double GYRO_MOUSE_COEFFICIENT = 0.0095;
private int GYRO_MOUSE_DEADZONE = 12;
private double GYRO_MOUSE_OFFSET = 0.1463;
private double GYRO_SMOOTH_MOUSE_OFFSET = 0.14696;
private const double GYRO_MOUSE_COEFFICIENT = 0.0095;
private const int GYRO_MOUSE_DEADZONE = 10;
private const double GYRO_MOUSE_OFFSET = 0.1463;
private const double GYRO_SMOOTH_MOUSE_OFFSET = 0.14698;
private const double TOUCHPAD_MOUSE_OFFSET = 0.015;
private const int SMOOTH_BUFFER_LEN = 3;
private double[] xSmoothBuffer = new double[SMOOTH_BUFFER_LEN];
@ -35,6 +37,7 @@ namespace DS4Windows
int tempInt = 0;
double tempDouble = 0.0;
bool tempBool = false;
public virtual void sixaxisMoved(SixAxisEventArgs arg)
{
@ -42,7 +45,8 @@ namespace DS4Windows
deltaX = Global.getGyroMouseHorizontalAxis(deviceNumber) == 0 ? arg.sixAxis.gyroYawFull :
arg.sixAxis.gyroRollFull;
deltaY = -arg.sixAxis.gyroPitchFull;
tempDouble = arg.sixAxis.elapsed * 0.001 * 250.0; // Base default speed on 4 ms
//tempDouble = arg.sixAxis.elapsed * 0.001 * 200.0; // Base default speed on 5 ms
tempDouble = arg.sixAxis.elapsed * 200.0; // Base default speed on 5 ms
gyroSmooth = Global.getGyroSmoothing(deviceNumber);
double gyroSmoothWeight = 0.0;
@ -58,11 +62,11 @@ namespace DS4Windows
}
}
double tempAngle = System.Math.Atan2(-deltaY, deltaX);
double normX = System.Math.Abs(System.Math.Cos(tempAngle));
double normY = System.Math.Abs(System.Math.Sin(tempAngle));
int signX = System.Math.Sign(deltaX);
int signY = System.Math.Sign(deltaY);
double tempAngle = Math.Atan2(-deltaY, deltaX);
double normX = Math.Abs(Math.Cos(tempAngle));
double normY = Math.Abs(Math.Sin(tempAngle));
int signX = Math.Sign(deltaX);
int signY = Math.Sign(deltaY);
if (deltaX == 0 || (hRemainder > 0 != deltaX > 0))
{
@ -74,12 +78,10 @@ namespace DS4Windows
vRemainder = 0.0;
}
int deadzone = GYRO_MOUSE_DEADZONE;
//int deadzone = 0;
int deadzoneX = (int)System.Math.Abs(normX * deadzone);
int deadzoneY = (int)System.Math.Abs(normY * deadzone);
int deadzoneX = (int)Math.Abs(normX * GYRO_MOUSE_DEADZONE);
int deadzoneY = (int)Math.Abs(normY * GYRO_MOUSE_DEADZONE);
if (System.Math.Abs(deltaX) > deadzoneX)
if (Math.Abs(deltaX) > deadzoneX)
{
deltaX -= signX * deadzoneX;
}
@ -88,7 +90,7 @@ namespace DS4Windows
deltaX = 0;
}
if (System.Math.Abs(deltaY) > deadzoneY)
if (Math.Abs(deltaY) > deadzoneY)
{
deltaY -= signY * deadzoneY;
}
@ -105,6 +107,10 @@ namespace DS4Windows
{
xMotion += hRemainder;
}
else
{
hRemainder = 0.0;
}
verticalScale = Global.getGyroSensVerticalScale(deviceNumber) * 0.01;
double yMotion = deltaY != 0 ? (coefficient * verticalScale) * (deltaY * tempDouble)
@ -115,6 +121,10 @@ namespace DS4Windows
{
yMotion += vRemainder;
}
else
{
vRemainder = 0.0;
}
if (gyroSmooth)
{
@ -129,7 +139,7 @@ namespace DS4Windows
int idx = 0;
for (int i = 0; i < SMOOTH_BUFFER_LEN; i++)
{
idx = System.Math.Abs(smoothBufferTail - i - 1) % SMOOTH_BUFFER_LEN;
idx = (smoothBufferTail - i - 1 + SMOOTH_BUFFER_LEN) % SMOOTH_BUFFER_LEN;
x_out += xSmoothBuffer[idx] * currentWeight;
y_out += ySmoothBuffer[idx] * currentWeight;
finalWeight += currentWeight;
@ -142,25 +152,18 @@ namespace DS4Windows
yMotion = y_out;
}
hRemainder = vRemainder = 0.0;
if (xMotion != 0.0)
{
xAction = (int)xMotion;
hRemainder = xMotion - xAction;
}
else
{
hRemainder = 0.0;
}
if (yMotion != 0.0)
{
yAction = (int)yMotion;
vRemainder = yMotion - yAction;
}
else
{
vRemainder = 0.0;
}
int gyroInvert = Global.getGyroInvert(deviceNumber);
if ((gyroInvert & 0x02) == 2)
@ -195,13 +198,13 @@ namespace DS4Windows
}
private byte lastTouchID;
public void touchesMoved(TouchpadEventArgs arg, bool dragging)
public void touchesMoved(TouchpadEventArgs arg, bool dragging, bool disableInvert = false)
{
int touchesLen = arg.touches.Length;
if ((!dragging && touchesLen != 1) || (dragging && touchesLen < 1))
return;
int deltaX, deltaY;
int deltaX = 0, deltaY = 0;
if (arg.touches[0].touchID != lastTouchID)
{
deltaX = deltaY = 0;
@ -209,56 +212,6 @@ namespace DS4Windows
horizontalDirection = verticalDirection = Direction.Neutral;
lastTouchID = arg.touches[0].touchID;
}
else if (Global.TouchpadJitterCompensation[deviceNumber])
{
// Often the DS4's internal jitter compensation kicks in and starts hiding changes, ironically creating jitter...
if (dragging && touchesLen > 1)
{
deltaX = arg.touches[1].deltaX;
deltaY = arg.touches[1].deltaY;
}
else
{
deltaX = arg.touches[0].deltaX;
deltaY = arg.touches[0].deltaY;
}
// allow only very fine, slow motions, when changing direction, even from neutral
// TODO maybe just consume it completely?
if (deltaX <= -1)
{
if (horizontalDirection != Direction.Negative)
{
deltaX = -1;
horizontalRemainder = 0.0;
}
}
else if (deltaX >= 1)
{
if (horizontalDirection != Direction.Positive)
{
deltaX = 1;
horizontalRemainder = 0.0;
}
}
if (deltaY <= -1)
{
if (verticalDirection != Direction.Negative)
{
deltaY = -1;
verticalRemainder = 0.0;
}
}
else if (deltaY >= 1)
{
if (verticalDirection != Direction.Positive)
{
deltaY = 1;
verticalRemainder = 0.0;
}
}
}
else
{
if (dragging && touchesLen > 1)
@ -273,42 +226,67 @@ namespace DS4Windows
}
}
double coefficient = Global.TouchSensitivity[deviceNumber] * 0.01;
// Collect rounding errors instead of losing motion.
double xMotion = coefficient * deltaX;
if (xMotion > 0.0)
double tempAngle = Math.Atan2(-deltaY, deltaX);
double normX = Math.Abs(Math.Cos(tempAngle));
double normY = Math.Abs(Math.Sin(tempAngle));
int signX = Math.Sign(deltaX);
int signY = Math.Sign(deltaY);
double coefficient = Global.getTouchSensitivity(deviceNumber) * 0.01;
bool jitterCompenstation = Global.getTouchpadJitterCompensation(deviceNumber);
double xMotion = deltaX != 0 ?
coefficient * deltaX + (normX * (TOUCHPAD_MOUSE_OFFSET * signX)) : 0.0;
double yMotion = deltaY != 0 ?
coefficient * deltaY + (normY * (TOUCHPAD_MOUSE_OFFSET * signY)) : 0.0;
if (jitterCompenstation)
{
if (horizontalRemainder > 0.0)
xMotion += horizontalRemainder;
double absX = Math.Abs(xMotion);
if (absX <= normX * 0.34)
{
xMotion = signX * Math.Pow(absX / 0.34f, 1.44) * 0.34;
}
double absY = Math.Abs(yMotion);
if (absY <= normY * 0.34)
{
yMotion = signY * Math.Pow(absY / 0.34f, 1.44) * 0.34;
}
}
else if (xMotion < 0.0)
// Collect rounding errors instead of losing motion.
if (xMotion > 0.0 && horizontalRemainder > 0.0)
{
if (horizontalRemainder < 0.0)
xMotion += horizontalRemainder;
xMotion += horizontalRemainder;
}
else if (xMotion < 0.0 && horizontalRemainder < 0.0)
{
xMotion += horizontalRemainder;
}
int xAction = (int)xMotion;
horizontalRemainder = xMotion - xAction;
double yMotion = coefficient * deltaY;
if (yMotion > 0.0)
if (yMotion > 0.0 && verticalRemainder > 0.0)
{
if (verticalRemainder > 0.0)
yMotion += verticalRemainder;
yMotion += verticalRemainder;
}
else if (yMotion < 0.0)
else if (yMotion < 0.0 && verticalRemainder < 0.0)
{
if (verticalRemainder < 0.0)
yMotion += verticalRemainder;
yMotion += verticalRemainder;
}
int yAction = (int)yMotion;
verticalRemainder = yMotion - yAction;
int touchpadInvert = tempInt = Global.getTouchpadInvert(deviceNumber);
if ((touchpadInvert & 0x02) == 2)
xAction *= -1;
if (disableInvert == false)
{
int touchpadInvert = tempInt = Global.getTouchpadInvert(deviceNumber);
if ((touchpadInvert & 0x02) == 2)
xAction *= -1;
if ((touchpadInvert & 0x01) == 1)
yAction *= -1;
if ((touchpadInvert & 0x01) == 1)
yAction *= -1;
}
if (yAction != 0 || xAction != 0)
InputMethods.MoveCursorBy(xAction, yAction);

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Reflection;
@ -224,21 +225,6 @@ namespace DS4Windows
}
}
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);
}
}
public class Global
{
protected static BackingStore m_Config = new BackingStore();
@ -250,8 +236,9 @@ namespace DS4Windows
public static string[] tempprofilename = new string[5] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
public static bool[] tempprofileDistance = new bool[5] { false, false, false, false, false };
public static bool[] useDInputOnly = new bool[5] { true, true, true, true, true };
public static bool[] linkedProfileCheck = new bool[4] { true, true, true, true };
public static X360Controls[] defaultButtonMapping = { X360Controls.None, X360Controls.LXNeg, X360Controls.LXPos,
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,
@ -281,6 +268,7 @@ namespace DS4Windows
appdatapath = path;
m_Config.m_Profile = appdatapath + "\\Profiles.xml";
m_Config.m_Actions = appdatapath + "\\Actions.xml";
m_Config.m_linkedProfiles = Global.appdatapath + "\\LinkedProfiles.xml";
}
/// <summary>
@ -572,6 +560,12 @@ namespace DS4Windows
return m_Config.sATriggers[index];
}
public static int[][] TouchDisInvertTriggers => m_Config.touchDisInvertTriggers;
public static int[] getTouchDisInvertTriggers(int index)
{
return m_Config.touchDisInvertTriggers[index];
}
public static int[] GyroSensitivity => m_Config.gyroSensitivity;
public static int getGyroSensitivity(int index)
{
@ -665,6 +659,10 @@ namespace DS4Windows
public static bool[] LowerRCOn => m_Config.lowerRCOn;
public static bool[] TouchpadJitterCompensation => m_Config.touchpadJitterCompensation;
public static bool getTouchpadJitterCompensation(int index)
{
return m_Config.touchpadJitterCompensation[index];
}
public static int[] TouchpadInvert => m_Config.touchpadInvert;
public static int getTouchpadInvert(int index)
@ -890,6 +888,7 @@ namespace DS4Windows
public static string[] LaunchProgram => m_Config.launchProgram;
public static string[] ProfilePath => m_Config.profilePath;
public static string[] OlderProfilePath => m_Config.olderProfilePath;
public static bool[] DistanceProfiles = m_Config.distanceProfiles;
public static List<string>[] ProfileActions => m_Config.profileActions;
@ -944,7 +943,8 @@ namespace DS4Windows
return m_Config.containsCustomExtras[deviceNum];
}
public static void SaveAction(string name, string controls, int mode, string details, bool edit, string extras = "")
public static void SaveAction(string name, string controls, int mode,
string details, bool edit, string extras = "")
{
m_Config.SaveAction(name, controls, mode, details, edit, extras);
Mapping.actionDone.Add(new Mapping.ActionState());
@ -1035,44 +1035,45 @@ namespace DS4Windows
return defaultButtonMapping[(int)dc];
}
/*public static X360Controls getCustomButton(int device, DS4Controls controlName) => m_Config.GetCustomButton(device, controlName);
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
|| m_Config.customMapKeys[device].Count > 0;
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 bool containsLinkedProfile(string serial)
{
string tempSerial = serial.Replace(":", string.Empty);
return m_Config.linkedProfiles.ContainsKey(tempSerial);
}
public static string getLinkedProfile(string serial)
{
string temp = string.Empty;
string tempSerial = serial.Replace(":", string.Empty);
if (m_Config.linkedProfiles.ContainsKey(tempSerial))
{
temp = m_Config.linkedProfiles[tempSerial];
}
return temp;
}
public static void changeLinkedProfile(string serial, string profile)
{
string tempSerial = serial.Replace(":", string.Empty);
m_Config.linkedProfiles[tempSerial] = profile;
}
public static void removeLinkedProfile(string serial)
{
string tempSerial = serial.Replace(":", string.Empty);
if (m_Config.linkedProfiles.ContainsKey(tempSerial))
{
m_Config.linkedProfiles.Remove(tempSerial);
}
}
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];
public static Dictionary<DS4Controls, DS4KeyType> getShiftCustomKeyTypes(int device) => m_Config.shiftCustomMapKeyTypes[device]; */
public static bool Load() => m_Config.Load();
public static void LoadProfile(int device, bool launchprogram, ControlService control, bool xinputChange = true)
public static void LoadProfile(int device, bool launchprogram, ControlService control,
bool xinputChange = true, bool postLoad = true)
{
m_Config.LoadProfile(device, launchprogram, control, "", xinputChange);
m_Config.LoadProfile(device, launchprogram, control, "", xinputChange, postLoad);
tempprofilename[device] = string.Empty;
tempprofileDistance[device] = false;
}
@ -1095,6 +1096,16 @@ namespace DS4Windows
m_Config.SaveProfile(device, propath);
}
public static bool SaveLinkedProfiles()
{
return m_Config.SaveLinkedProfiles();
}
public static bool LoadLinkedProfiles()
{
return m_Config.LoadLinkedProfiles();
}
private static byte applyRatio(byte b1, byte b2, double r)
{
if (r > 100.0)
@ -1187,60 +1198,62 @@ namespace DS4Windows
}
}
public class BackingStore
{
//public String m_Profile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool" + "\\Profiles.xml";
public String m_Profile = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName + "\\Profiles.xml";
public String m_Actions = Global.appdatapath + "\\Actions.xml";
public string m_linkedProfiles = Global.appdatapath + "\\LinkedProfiles.xml";
protected XmlDocument m_Xdoc = new XmlDocument();
// fifth value used for options, not fifth controller
public int[] buttonMouseSensitivity = { 25, 25, 25, 25, 25 };
public int[] buttonMouseSensitivity = new int[5] { 25, 25, 25, 25, 25 };
public bool[] flushHIDQueue = { false, false, false, false, false };
public bool[] enableTouchToggle = { true, true, true, true, true };
public int[] idleDisconnectTimeout = { 0, 0, 0, 0, 0 };
public bool[] touchpadJitterCompensation = { true, true, true, true, true };
public bool[] lowerRCOn = { false, false, false, false, false };
public bool[] ledAsBattery = { false, false, false, false, false };
public byte[] flashType = { 0, 0, 0, 0, 0 };
public string[] profilePath = { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
public bool[] flushHIDQueue = new bool[5] { false, false, false, false, false };
public bool[] enableTouchToggle = new bool[5] { true, true, true, true, true };
public int[] idleDisconnectTimeout = new int[5] { 0, 0, 0, 0, 0 };
public bool[] touchpadJitterCompensation = new bool[5] { true, true, true, true, true };
public bool[] lowerRCOn = new bool[5] { false, false, false, false, false };
public bool[] ledAsBattery = new bool[5] { false, false, false, false, false };
public byte[] flashType = new byte[5] { 0, 0, 0, 0, 0 };
public string[] profilePath = new string[5] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
public string[] olderProfilePath = new string[5] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
public Dictionary<string, string> linkedProfiles = new Dictionary<string, string>();
// Cache properties instead of performing a string comparison every frame
public bool[] distanceProfiles = { false, false, false, false, false };
public Byte[] rumble = { 100, 100, 100, 100, 100 };
public Byte[] touchSensitivity = { 100, 100, 100, 100, 100 };
public Byte[] l2Deadzone = { 0, 0, 0, 0, 0 }, r2Deadzone = { 0, 0, 0, 0, 0 };
public int[] LSDeadzone = { 0, 0, 0, 0, 0 }, RSDeadzone = { 0, 0, 0, 0, 0 };
public int[] LSAntiDeadzone = { 0, 0, 0, 0, 0 }, RSAntiDeadzone = { 0, 0, 0, 0, 0 };
public int[] LSMaxzone = { 100, 100, 100, 100, 100 }, RSMaxzone = { 100, 100, 100, 100, 100 };
public int[] l2AntiDeadzone = { 0, 0, 0, 0, 0 }, r2AntiDeadzone = { 0, 0, 0, 0, 0 };
public int[] l2Maxzone = { 100, 100, 100, 100, 100 }, r2Maxzone = { 100, 100, 100, 100, 100 };
public double[] LSRotation = { 0.0, 0.0, 0.0, 0.0, 0.0 }, RSRotation = { 0.0, 0.0, 0.0, 0.0, 0.0 };
public double[] SXDeadzone = { 0.25, 0.25, 0.25, 0.25, 0.25 }, SZDeadzone = { 0.25, 0.25, 0.25, 0.25, 0.25 };
public bool[] distanceProfiles = new bool[5] { false, false, false, false, false };
public Byte[] rumble = new Byte[5] { 100, 100, 100, 100, 100 };
public Byte[] touchSensitivity = new Byte[5] { 100, 100, 100, 100, 100 };
public Byte[] l2Deadzone = new Byte[5] { 0, 0, 0, 0, 0 }, r2Deadzone = new Byte[5] { 0, 0, 0, 0, 0 };
public int[] LSDeadzone = new int[5] { 0, 0, 0, 0, 0 }, RSDeadzone = new int[5] { 0, 0, 0, 0, 0 };
public int[] LSAntiDeadzone = new int[5] { 0, 0, 0, 0, 0 }, RSAntiDeadzone = new int[5] { 0, 0, 0, 0, 0 };
public int[] LSMaxzone = new int[5] { 100, 100, 100, 100, 100 }, RSMaxzone = new int[5] { 100, 100, 100, 100, 100 };
public int[] l2AntiDeadzone = new int[5] { 0, 0, 0, 0, 0 }, r2AntiDeadzone = new int[5] { 0, 0, 0, 0, 0 };
public int[] l2Maxzone = new int[5] { 100, 100, 100, 100, 100 }, r2Maxzone = new int[5] { 100, 100, 100, 100, 100 };
public double[] LSRotation = new double[5] { 0.0, 0.0, 0.0, 0.0, 0.0 }, RSRotation = new double[5] { 0.0, 0.0, 0.0, 0.0, 0.0 };
public double[] SXDeadzone = new double[5] { 0.25, 0.25, 0.25, 0.25, 0.25 }, SZDeadzone = new double[5] { 0.25, 0.25, 0.25, 0.25, 0.25 };
public double[] SXMaxzone = new double[5] { 1.0, 1.0, 1.0, 1.0, 1.0 },
SZMaxzone = new double[5] { 1.0, 1.0, 1.0, 1.0, 1.0 };
public double[] SXAntiDeadzone = new double[5] { 0.0, 0.0, 0.0, 0.0, 0.0 },
SZAntiDeadzone = new double[5] { 0.0, 0.0, 0.0, 0.0, 0.0 };
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 };
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 int[] touchpadInvert = { 0, 0, 0, 0, 0 };
public double[] rainbow = { 0, 0, 0, 0, 0 };
public int[] flashAt = { 0, 0, 0, 0, 0 };
public bool[] mouseAccel = { true, true, true, true, true };
public int[] btPollRate = { 4, 4, 4, 4, 4 };
public int[] lsOutCurveMode = { 0, 0, 0, 0, 0 };
public int[] rsOutCurveMode = { 0, 0, 0, 0, 0 };
public double[] l2Sens = new double[5] { 1.0, 1.0, 1.0, 1.0, 1.0 }, r2Sens = new double[5] { 1.0, 1.0, 1.0, 1.0, 1.0 };
public double[] LSSens = new double[5] { 1.0, 1.0, 1.0, 1.0, 1.0 }, RSSens = new double[5] { 1.0, 1.0, 1.0, 1.0, 1.0 };
public double[] SXSens = new double[5] { 1.0, 1.0, 1.0, 1.0, 1.0 }, SZSens = new double[5] { 1.0, 1.0, 1.0, 1.0, 1.0 };
public Byte[] tapSensitivity = new Byte[5] { 0, 0, 0, 0, 0 };
public bool[] doubleTap = new bool[5] { false, false, false, false, false };
public int[] scrollSensitivity = new int[5] { 0, 0, 0, 0, 0 };
public int[] touchpadInvert = new int[5] { 0, 0, 0, 0, 0 };
public double[] rainbow = new double[5] { 0.0, 0.0, 0.0, 0.0, 0.0 };
public int[] flashAt = new int[5] { 0, 0, 0, 0, 0 };
public bool[] mouseAccel = new bool[5] { true, true, true, true, true };
public int[] btPollRate = new int[5] { 4, 4, 4, 4, 4 };
public int[] lsOutCurveMode = new int[5] { 0, 0, 0, 0, 0 };
public int[] rsOutCurveMode = new int[5] { 0, 0, 0, 0, 0 };
public int[] l2OutCurveMode = new int[5] { 0, 0, 0, 0, 0 };
public int[] r2OutCurveMode = new int[5] { 0, 0, 0, 0, 0 };
public int[] sxOutCurveMode = new int[5] { 0, 0, 0, 0, 0 };
public int[] szOutCurveMode = new int[5] { 0, 0, 0, 0, 0 };
public DS4Color[] m_LowLeds = new DS4Color[]
public DS4Color[] m_LowLeds = new DS4Color[5]
{
new DS4Color(Color.Black),
new DS4Color(Color.Black),
@ -1248,7 +1261,7 @@ namespace DS4Windows
new DS4Color(Color.Black),
new DS4Color(Color.Black)
};
public DS4Color[] m_Leds = new DS4Color[]
public DS4Color[] m_Leds = new DS4Color[5]
{
new DS4Color(Color.Blue),
new DS4Color(Color.Red),
@ -1256,7 +1269,7 @@ namespace DS4Windows
new DS4Color(Color.Pink),
new DS4Color(Color.White)
};
public DS4Color[] m_ChargingLeds = new DS4Color[]
public DS4Color[] m_ChargingLeds = new DS4Color[5]
{
new DS4Color(Color.Black),
new DS4Color(Color.Black),
@ -1264,7 +1277,7 @@ namespace DS4Windows
new DS4Color(Color.Black),
new DS4Color(Color.Black)
};
public DS4Color[] m_FlashLeds = new DS4Color[]
public DS4Color[] m_FlashLeds = new DS4Color[5]
{
new DS4Color(Color.Black),
new DS4Color(Color.Black),
@ -1272,8 +1285,8 @@ namespace DS4Windows
new DS4Color(Color.Black),
new DS4Color(Color.Black)
};
public bool[] useCustomLeds = new bool[] { false, false, false, false, false };
public DS4Color[] m_CustomLeds = new DS4Color[]
public bool[] useCustomLeds = new bool[5] { false, false, false, false, false };
public DS4Color[] m_CustomLeds = new DS4Color[5]
{
new DS4Color(Color.Black),
new DS4Color(Color.Black),
@ -1281,15 +1294,18 @@ namespace DS4Windows
new DS4Color(Color.Black),
new DS4Color(Color.Black)
};
public int[] chargingType = { 0, 0, 0, 0, 0 };
public string[] launchProgram = { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
public bool[] dinputOnly = { false, false, false, false, false };
public bool[] startTouchpadOff = { false, false, false, false, false };
public bool[] useTPforControls = { false, false, false, false, false };
public bool[] useSAforMouse = { false, false, false, false, false };
public string[] sATriggers = { "", "", "", "", "" };
public int[] lsCurve = { 0, 0, 0, 0, 0 };
public int[] rsCurve = { 0, 0, 0, 0, 0 };
public int[] chargingType = new int[5] { 0, 0, 0, 0, 0 };
public string[] launchProgram = new string[5] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
public bool[] dinputOnly = new bool[5] { false, false, false, false, false };
public bool[] startTouchpadOff = new bool[5] { false, false, false, false, false };
public bool[] useTPforControls = new bool[5] { false, false, false, false, false };
public bool[] useSAforMouse = new bool[5] { false, false, false, false, false };
public string[] sATriggers = new string[5] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
public int[][] touchDisInvertTriggers = new int[5][] { new int[1] { -1 }, new int[1] { -1 }, new int[1] { -1 },
new int[1] { -1 }, new int[1] { -1 } };
public int[] lsCurve = new int[5] { 0, 0, 0, 0, 0 };
public int[] rsCurve = new int[5] { 0, 0, 0, 0, 0 };
public Boolean useExclusiveMode = false;
public Int32 formWidth = 782;
public Int32 formHeight = 550;
@ -1304,38 +1320,36 @@ namespace DS4Windows
public int firstXinputPort = 1;
public bool closeMini = false;
public List<SpecialAction> actions = new List<SpecialAction>();
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 };
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 };
public Dictionary<DS4Controls, String>[] customMapExtras = { null, null, null, null, null };
public List<DS4ControlSettings>[] ds4settings = new List<DS4ControlSettings>[5]
{ new List<DS4ControlSettings>(), new List<DS4ControlSettings>(), new List<DS4ControlSettings>(),
new List<DS4ControlSettings>(), new List<DS4ControlSettings>() };
public List<string>[] profileActions = new List<string>[5] { null, null, null, null, null };
public int[] profileActionCount = new int[5] { 0, 0, 0, 0, 0 };
public Dictionary<string, SpecialAction>[] profileActionDict = new Dictionary<string, SpecialAction>[5]
{ 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>[5]
{ new Dictionary<string, int>(), new Dictionary<string, int>(), new Dictionary<string, int>(),
new Dictionary<string, int>(), new Dictionary<string, int>() };
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 };
public Dictionary<DS4Controls, String>[] shiftCustomMapExtras = { null, null, null, null, null };*/
public List<string>[] profileActions = { null, null, null, null, null };
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>() };
public bool downloadLang = true;
public bool useWhiteIcon;
public bool flashWhenLate = true;
public int flashWhenLateAt = 20;
// Cache whether profile has custom action
public bool[] containsCustomAction = { false, false, false, false, false };
public bool[] containsCustomAction = new bool[5] { false, false, false, false, false };
// Cache whether profile has custom extras
public bool[] containsCustomExtras = { false, false, false, false, false };
public bool[] containsCustomExtras = new bool[5] { false, false, false, false, false };
public int[] gyroSensitivity = { 100, 100, 100, 100, 100 };
public int[] gyroSensVerticalScale = { 100, 100, 100, 100, 100 };
public int[] gyroInvert = { 0, 0, 0, 0, 0 };
public bool[] gyroTriggerTurns = { true, true, true, true, true };
public bool[] gyroSmoothing = { false, false, false, false, false };
public double[] gyroSmoothWeight = { 0.5, 0.5, 0.5, 0.5, 0.5 };
public int[] gyroSensitivity = new int[5] { 100, 100, 100, 100, 100 };
public int[] gyroSensVerticalScale = new int[5] { 100, 100, 100, 100, 100 };
public int[] gyroInvert = new int[5] { 0, 0, 0, 0, 0 };
public bool[] gyroTriggerTurns = new bool[5] { true, true, true, true, true };
public bool[] gyroSmoothing = new bool[5] { false, false, false, false, false };
public double[] gyroSmoothWeight = new double[5] { 0.5, 0.5, 0.5, 0.5, 0.5 };
public int[] gyroMouseHorizontalAxis = new int[5] { 0, 0, 0, 0, 0 };
bool tempBool = false;
@ -1350,94 +1364,12 @@ namespace DS4Windows
ds4settings[i].Add(new DS4ControlSettings(dc));
}
/*customMapKeyTypes[i] = new Dictionary<DS4Controls, DS4KeyType>();
customMapKeys[i] = new Dictionary<DS4Controls, UInt16>();
customMapMacros[i] = new Dictionary<DS4Controls, String>();
customMapButtons[i] = new Dictionary<DS4Controls, X360Controls>();
customMapExtras[i] = new Dictionary<DS4Controls, string>();
shiftCustomMapKeyTypes[i] = new Dictionary<DS4Controls, DS4KeyType>();
shiftCustomMapKeys[i] = new Dictionary<DS4Controls, UInt16>();
shiftCustomMapMacros[i] = new Dictionary<DS4Controls, String>();
shiftCustomMapButtons[i] = new Dictionary<DS4Controls, X360Controls>();
shiftCustomMapExtras[i] = new Dictionary<DS4Controls, string>();*/
profileActions[i] = new List<string>();
profileActions[i].Add("Disconnect Controller");
profileActionCount[i] = profileActions[i].Count;
}
}
/*public X360Controls GetCustomButton(int device, DS4Controls controlName)
{
if (customMapButtons[device].ContainsKey(controlName))
return customMapButtons[device][controlName];
else return X360Controls.None;
}
public UInt16 GetCustomKey(int device, DS4Controls controlName)
{
if (customMapKeys[device].ContainsKey(controlName))
return customMapKeys[device][controlName];
else return 0;
}
public string GetCustomMacro(int device, DS4Controls controlName)
{
if (customMapMacros[device].ContainsKey(controlName))
return customMapMacros[device][controlName];
else return "0";
}
public string GetCustomExtras(int device, DS4Controls controlName)
{
if (customMapExtras[device].ContainsKey(controlName))
return customMapExtras[device][controlName];
else return "0";
}
public DS4KeyType GetCustomKeyType(int device, DS4Controls controlName)
{
try
{
if (customMapKeyTypes[device].ContainsKey(controlName))
return customMapKeyTypes[device][controlName];
else return 0;
}
catch { return 0; }
}
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";
}
public string GetShiftCustomExtras(int device, DS4Controls controlName)
{
if (customMapExtras[device].ContainsKey(controlName))
return customMapExtras[device][controlName];
else return "0";
}
public DS4KeyType GetShiftCustomKeyType(int device, DS4Controls controlName)
{
try
{
if (shiftCustomMapKeyTypes[device].ContainsKey(controlName))
return shiftCustomMapKeyTypes[device][controlName];
else return 0;
}
catch { return 0; }
}*/
private string stickOutputCurveString(int id)
{
string result = "linear";
@ -1583,6 +1515,12 @@ namespace DS4Windows
XmlNode xmlUseTPforControls = m_Xdoc.CreateNode(XmlNodeType.Element, "UseTPforControls", null); xmlUseTPforControls.InnerText = useTPforControls[device].ToString(); Node.AppendChild(xmlUseTPforControls);
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 xmlTouchDisInvTriggers = m_Xdoc.CreateNode(XmlNodeType.Element, "TouchDisInvTriggers", null);
string tempTouchDisInv = string.Join(",", touchDisInvertTriggers[device]);
xmlTouchDisInvTriggers.InnerText = tempTouchDisInv;
Node.AppendChild(xmlTouchDisInvTriggers);
XmlNode xmlGyroSensitivity = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroSensitivity", null); xmlGyroSensitivity.InnerText = gyroSensitivity[device].ToString(); Node.AppendChild(xmlGyroSensitivity);
XmlNode xmlGyroSensVerticalScale = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroSensVerticalScale", null); xmlGyroSensVerticalScale.InnerText = gyroSensVerticalScale[device].ToString(); Node.AppendChild(xmlGyroSensVerticalScale);
XmlNode xmlGyroInvert = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroInvert", null); xmlGyroInvert.InnerText = gyroInvert[device].ToString(); Node.AppendChild(xmlGyroInvert);
@ -1785,104 +1723,7 @@ namespace DS4Windows
NodeShiftControl.AppendChild(ShiftKeyType);
if (ShiftExtras.HasChildNodes)
NodeShiftControl.AppendChild(ShiftExtras);
/*else if (xmlControls != null)
{
Node.AppendChild(xmlControls);
}*/
/*if (shiftModifier[device] > 0)
{
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);
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;
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;
if (keyType != String.Empty)
{
buttonNode = m_Xdoc.CreateNode(XmlNodeType.Element, button.Name, null);
buttonNode.InnerText = keyType;
ShiftKeyType.AppendChild(buttonNode);
}
string[] extras;
buttonNode = m_Xdoc.CreateNode(XmlNodeType.Element, button.Name, null);
if (button.Tag is KeyValuePair<IEnumerable<int>, string> || button.Tag is KeyValuePair<Int32[], string> || button.Tag is KeyValuePair<UInt16[], string>)
{
KeyValuePair<Int32[], string> tag = (KeyValuePair<Int32[], string>)button.Tag;
int[] ii = tag.Key;
buttonNode.InnerText = string.Join("/", ii);
ShiftMacro.AppendChild(buttonNode);
extras = tag.Value.Split(',');
}
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();
ShiftKey.AppendChild(buttonNode);
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;
}
if (hasvalue && !string.IsNullOrEmpty(String.Join(",", extras)))
{
XmlNode extraNode = m_Xdoc.CreateNode(XmlNodeType.Element, button.Name, null);
extraNode.InnerText = String.Join(",", extras);
ShiftExtras.AppendChild(extraNode);
}
}
}
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);
}*/
m_Xdoc.AppendChild(Node);
m_Xdoc.Save(path);
}
@ -1892,7 +1733,6 @@ namespace DS4Windows
public DS4Controls getDS4ControlsByName(string key)
{
if (!key.StartsWith("bn"))
return (DS4Controls)Enum.Parse(typeof(DS4Controls), key, true);
@ -2133,7 +1973,7 @@ namespace DS4Windows
}
public bool LoadProfile(int device, bool launchprogram, ControlService control,
string propath = "", bool xinputChange = true)
string propath = "", bool xinputChange = true, bool postLoad = true)
{
bool Loaded = true;
Dictionary<DS4Controls, DS4KeyType> customMapKeyTypes = new Dictionary<DS4Controls, DS4KeyType>();
@ -2556,6 +2396,21 @@ namespace DS4Windows
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/SATriggers"); sATriggers[device] = Item.InnerText; }
catch { sATriggers[device] = ""; missingSetting = true; }
try {
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/TouchDisInvTriggers");
string[] triggers = Item.InnerText.Split(',');
int temp = -1;
List<int> tempIntList = new List<int>();
for (int i = 0, arlen = triggers.Length; i < arlen; i++)
{
if (int.TryParse(triggers[i], out temp))
tempIntList.Add(temp);
}
touchDisInvertTriggers[device] = tempIntList.ToArray();
}
catch { touchDisInvertTriggers[device] = new int[1] { -1 }; missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroSensitivity"); int.TryParse(Item.InnerText, out gyroSensitivity[device]); }
catch { gyroSensitivity[device] = 100; missingSetting = true; }
@ -2821,7 +2676,7 @@ namespace DS4Windows
// If a device exists, make sure to transfer relevant profile device
// options to device instance
if (device < 4)
if (postLoad && device < 4)
{
DS4Device tempDev = control.DS4Controllers[device];
if (tempDev != null)
@ -2837,119 +2692,6 @@ namespace DS4Windows
return Loaded;
}
public void LoadButtons(System.Windows.Forms.Control[] buttons, string control, Dictionary<DS4Controls, DS4KeyType> customMapKeyTypes,
Dictionary<DS4Controls, UInt16> customMapKeys, Dictionary<DS4Controls, X360Controls> customMapButtons, Dictionary<DS4Controls, String> customMapMacros, Dictionary<DS4Controls, String> customMapExtras)
{
XmlNode Item;
DS4KeyType keyType;
UInt16 wvk;
string rootname = "DS4Windows";
foreach (var button in buttons)
try
{
if (m_Xdoc.SelectSingleNode(rootname) == null)
{
rootname = "ScpControl";
}
//bool foundBinding = false;
button.Font = new Font(button.Font, FontStyle.Regular);
Item = m_Xdoc.SelectSingleNode(String.Format("/" + rootname + "/" + control + "/KeyType/{0}", button.Name));
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);
}
string extras;
Item = m_Xdoc.SelectSingleNode(String.Format("/" + rootname + "/" + control + "/Extras/{0}", button.Name));
if (Item != null)
{
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";
}
}
else
extras = "0,0,0,0,0,0,0,0";
Item = m_Xdoc.SelectSingleNode(String.Format("/" + rootname + "/" + control + "/Macro/{0}", button.Name));
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";
button.Tag = new KeyValuePair<int[], string>(keys, extras);
customMapMacros.Add(getDS4ControlsByName(button.Name), Item.InnerText);
}
else if (m_Xdoc.SelectSingleNode(String.Format("/" + rootname + "/" + control + "/Key/{0}", button.Name)) != null)
{
Item = m_Xdoc.SelectSingleNode(String.Format("/" + rootname + "/" + control + "/Key/{0}", button.Name));
if (UInt16.TryParse(Item.InnerText, out wvk))
{
//foundBinding = true;
customMapKeys.Add(getDS4ControlsByName(Item.Name), wvk);
button.Tag = new KeyValuePair<int, string>(wvk, extras);
button.Text = ((System.Windows.Forms.Keys)wvk).ToString();
}
}
else if (m_Xdoc.SelectSingleNode(String.Format("/" + rootname + "/" + control + "/Button/{0}", button.Name)) != null)
{
Item = m_Xdoc.SelectSingleNode(String.Format("/" + rootname + "/" + control + "/Button/{0}", button.Name));
//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);
}
}
catch
{
}
}
public bool Load()
{
bool Loaded = true;
@ -2977,32 +2719,40 @@ namespace DS4Windows
{
distanceProfiles[0] = true;
}
olderProfilePath[0] = profilePath[0];
}
catch { profilePath[0] = string.Empty; distanceProfiles[0] = false; missingSetting = true; }
catch { profilePath[0] = olderProfilePath[0] = string.Empty; distanceProfiles[0] = false; missingSetting = true; }
try {
Item = m_Xdoc.SelectSingleNode("/Profile/Controller2"); profilePath[1] = Item.InnerText;
if (profilePath[1].ToLower().Contains("distance"))
{
distanceProfiles[1] = true;
}
olderProfilePath[1] = profilePath[1];
}
catch { profilePath[1] = string.Empty; distanceProfiles[1] = false; missingSetting = true; }
catch { profilePath[1] = olderProfilePath[1] = string.Empty; distanceProfiles[1] = false; missingSetting = true; }
try {
Item = m_Xdoc.SelectSingleNode("/Profile/Controller3"); profilePath[2] = Item.InnerText;
if (profilePath[2].ToLower().Contains("distance"))
{
distanceProfiles[2] = true;
}
olderProfilePath[2] = profilePath[2];
}
catch { profilePath[2] = string.Empty; distanceProfiles[2] = false; missingSetting = true; }
catch { profilePath[2] = olderProfilePath[2] = string.Empty; distanceProfiles[2] = false; missingSetting = true; }
try {
Item = m_Xdoc.SelectSingleNode("/Profile/Controller4"); profilePath[3] = Item.InnerText;
if (profilePath[3].ToLower().Contains("distance"))
{
distanceProfiles[3] = true;
}
olderProfilePath[3] = profilePath[3];
}
catch { profilePath[3] = string.Empty; distanceProfiles[3] = false; missingSetting = true; }
catch { profilePath[3] = olderProfilePath[3] = string.Empty; distanceProfiles[3] = false; missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/Profile/LastChecked"); DateTime.TryParse(Item.InnerText, out lastChecked); }
catch { missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/Profile/CheckWhen"); Int32.TryParse(Item.InnerText, out CheckWhen); }
@ -3080,10 +2830,10 @@ namespace DS4Windows
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);
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);
XmlNode xmlController1 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller1", null); xmlController1.InnerText = !Global.linkedProfileCheck[0] ? profilePath[0] : olderProfilePath[0]; Node.AppendChild(xmlController1);
XmlNode xmlController2 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller2", null); xmlController2.InnerText = !Global.linkedProfileCheck[1] ? profilePath[1] : olderProfilePath[1]; Node.AppendChild(xmlController2);
XmlNode xmlController3 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller3", null); xmlController3.InnerText = !Global.linkedProfileCheck[2] ? profilePath[2] : olderProfilePath[2]; Node.AppendChild(xmlController3);
XmlNode xmlController4 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller4", null); xmlController4.InnerText = !Global.linkedProfileCheck[3] ? profilePath[3] : olderProfilePath[3]; Node.AppendChild(xmlController4);
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);
@ -3116,8 +2866,6 @@ namespace DS4Windows
return Saved;
}
private void CreateAction()
{
XmlDocument m_Xdoc = new XmlDocument();
@ -3319,6 +3067,105 @@ namespace DS4Windows
return saved;
}
public bool createLinkedProfiles()
{
bool saved = true;
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(" Mac Address and Profile Linking Data. {0} ", DateTime.Now));
m_Xdoc.AppendChild(Node);
Node = m_Xdoc.CreateWhitespace("\r\n");
m_Xdoc.AppendChild(Node);
Node = m_Xdoc.CreateNode(XmlNodeType.Element, "LinkedControllers", "");
m_Xdoc.AppendChild(Node);
try { m_Xdoc.Save(m_linkedProfiles); }
catch (UnauthorizedAccessException) { Log.LogToGui("Unauthorized Access - Save failed to path: " + m_linkedProfiles, false); saved = false; }
return saved;
}
public bool LoadLinkedProfiles()
{
bool loaded = true;
if (File.Exists(m_linkedProfiles))
{
XmlDocument linkedXdoc = new XmlDocument();
XmlNode Node;
linkedXdoc.Load(m_linkedProfiles);
linkedProfiles.Clear();
try
{
Node = linkedXdoc.SelectSingleNode("/LinkedControllers");
XmlNodeList links = Node.ChildNodes;
for (int i = 0, listLen = links.Count; i < listLen; i++)
{
XmlNode current = links[i];
string serial = current.Name.Replace("MAC", string.Empty);
string profile = current.InnerText;
linkedProfiles[serial] = profile;
}
}
catch { loaded = false; }
}
else
{
Log.LogToGui("LinkedProfiles.xml can't be found.", false);
loaded = false;
}
return loaded;
}
public bool SaveLinkedProfiles()
{
bool saved = true;
if (File.Exists(m_linkedProfiles))
{
XmlDocument linkedXdoc = new XmlDocument();
XmlNode Node;
Node = linkedXdoc.CreateXmlDeclaration("1.0", "utf-8", string.Empty);
linkedXdoc.AppendChild(Node);
Node = linkedXdoc.CreateComment(string.Format(" Mac Address and Profile Linking Data. {0} ", DateTime.Now));
linkedXdoc.AppendChild(Node);
Node = linkedXdoc.CreateWhitespace("\r\n");
linkedXdoc.AppendChild(Node);
Node = linkedXdoc.CreateNode(XmlNodeType.Element, "LinkedControllers", "");
linkedXdoc.AppendChild(Node);
Dictionary<string, string>.KeyCollection serials = linkedProfiles.Keys;
for (int i = 0, itemCount = linkedProfiles.Count; i < itemCount; i++)
{
string serial = serials.ElementAt(i);
string profile = linkedProfiles[serial];
XmlElement link = linkedXdoc.CreateElement("MAC" + serial);
link.InnerText = profile;
Node.AppendChild(link);
}
try { linkedXdoc.Save(m_linkedProfiles); }
catch (UnauthorizedAccessException) { Log.LogToGui("Unauthorized Access - Save failed to path: " + m_linkedProfiles, false); saved = false; }
}
else
{
saved = createLinkedProfiles();
saved = saved && SaveLinkedProfiles();
}
return saved;
}
public void UpdateDS4CSetting(int deviceNum, string buttonName, bool shift, object action, string exts, DS4KeyType kt, int trigger = 0)
{
DS4Controls dc;
@ -3586,7 +3433,7 @@ namespace DS4Windows
flushHIDQueue[device] = false;
enableTouchToggle[device] = false;
idleDisconnectTimeout[device] = 0;
touchpadJitterCompensation[device] = false;
touchpadJitterCompensation[device] = true;
lowerRCOn[device] = false;
ledAsBattery[device] = false;
flashType[device] = 0;
@ -3640,7 +3487,8 @@ namespace DS4Windows
startTouchpadOff[device] = false;
useTPforControls[device] = false;
useSAforMouse[device] = false;
sATriggers[device] = "";
sATriggers[device] = string.Empty;
touchDisInvertTriggers[device] = new int[1] { -1 };
lsCurve[device] = rsCurve[device] = 0;
gyroSensitivity[device] = 100;
gyroSensVerticalScale[device] = 100;

View File

@ -83,6 +83,11 @@
this.bnLight1 = new System.Windows.Forms.Button();
this.bnLight2 = new System.Windows.Forms.Button();
this.bnLight4 = new System.Windows.Forms.Button();
this.lbLinkProfile = new System.Windows.Forms.Label();
this.linkCB1 = new System.Windows.Forms.CheckBox();
this.linkCB2 = new System.Windows.Forms.CheckBox();
this.linkCB3 = new System.Windows.Forms.CheckBox();
this.linkCB4 = new System.Windows.Forms.CheckBox();
this.lbNoControllers = new System.Windows.Forms.Label();
this.tabProfiles = new System.Windows.Forms.TabPage();
this.lBProfiles = new System.Windows.Forms.ListBox();
@ -367,21 +372,21 @@
// tLPControllers
//
resources.ApplyResources(this.tLPControllers, "tLPControllers");
this.tLPControllers.Controls.Add(this.bnLight3, 5, 3);
this.tLPControllers.Controls.Add(this.bnLight3, 6, 3);
this.tLPControllers.Controls.Add(this.pBStatus1, 1, 1);
this.tLPControllers.Controls.Add(this.lbPad1, 0, 1);
this.tLPControllers.Controls.Add(this.lbPad2, 0, 2);
this.tLPControllers.Controls.Add(this.bnEditC3, 4, 3);
this.tLPControllers.Controls.Add(this.bnEditC4, 4, 4);
this.tLPControllers.Controls.Add(this.bnEditC3, 5, 3);
this.tLPControllers.Controls.Add(this.bnEditC4, 5, 4);
this.tLPControllers.Controls.Add(this.lbPad3, 0, 3);
this.tLPControllers.Controls.Add(this.lbPad4, 0, 4);
this.tLPControllers.Controls.Add(this.cBController1, 3, 1);
this.tLPControllers.Controls.Add(this.bnEditC2, 4, 2);
this.tLPControllers.Controls.Add(this.cBController2, 3, 2);
this.tLPControllers.Controls.Add(this.cBController3, 3, 3);
this.tLPControllers.Controls.Add(this.bnEditC1, 4, 1);
this.tLPControllers.Controls.Add(this.cBController4, 3, 4);
this.tLPControllers.Controls.Add(this.lbSelectedProfile, 3, 0);
this.tLPControllers.Controls.Add(this.cBController1, 4, 1);
this.tLPControllers.Controls.Add(this.bnEditC2, 5, 2);
this.tLPControllers.Controls.Add(this.cBController2, 4, 2);
this.tLPControllers.Controls.Add(this.cBController3, 4, 3);
this.tLPControllers.Controls.Add(this.bnEditC1, 5, 1);
this.tLPControllers.Controls.Add(this.cBController4, 4, 4);
this.tLPControllers.Controls.Add(this.lbSelectedProfile, 4, 0);
this.tLPControllers.Controls.Add(this.lbID, 0, 0);
this.tLPControllers.Controls.Add(this.lbStatus, 1, 0);
this.tLPControllers.Controls.Add(this.lbBattery, 2, 0);
@ -392,9 +397,14 @@
this.tLPControllers.Controls.Add(this.pBStatus2, 1, 2);
this.tLPControllers.Controls.Add(this.pBStatus3, 1, 3);
this.tLPControllers.Controls.Add(this.pBStatus4, 1, 4);
this.tLPControllers.Controls.Add(this.bnLight1, 5, 1);
this.tLPControllers.Controls.Add(this.bnLight2, 5, 2);
this.tLPControllers.Controls.Add(this.bnLight4, 5, 4);
this.tLPControllers.Controls.Add(this.bnLight1, 6, 1);
this.tLPControllers.Controls.Add(this.bnLight2, 6, 2);
this.tLPControllers.Controls.Add(this.bnLight4, 6, 4);
this.tLPControllers.Controls.Add(this.lbLinkProfile, 3, 0);
this.tLPControllers.Controls.Add(this.linkCB1, 3, 1);
this.tLPControllers.Controls.Add(this.linkCB2, 3, 2);
this.tLPControllers.Controls.Add(this.linkCB3, 3, 3);
this.tLPControllers.Controls.Add(this.linkCB4, 3, 4);
this.tLPControllers.Name = "tLPControllers";
//
// bnLight3
@ -613,6 +623,43 @@
this.bnLight4.UseVisualStyleBackColor = false;
this.bnLight4.Click += new System.EventHandler(this.EditCustomLed);
//
// lbLinkProfile
//
resources.ApplyResources(this.lbLinkProfile, "lbLinkProfile");
this.lbLinkProfile.Name = "lbLinkProfile";
//
// linkCB1
//
resources.ApplyResources(this.linkCB1, "linkCB1");
this.linkCB1.Name = "linkCB1";
this.linkCB1.Tag = "0";
this.linkCB1.UseVisualStyleBackColor = true;
this.linkCB1.CheckedChanged += new System.EventHandler(this.linkCB_CheckedChanged);
//
// linkCB2
//
resources.ApplyResources(this.linkCB2, "linkCB2");
this.linkCB2.Name = "linkCB2";
this.linkCB2.Tag = "1";
this.linkCB2.UseVisualStyleBackColor = true;
this.linkCB2.CheckedChanged += new System.EventHandler(this.linkCB_CheckedChanged);
//
// linkCB3
//
resources.ApplyResources(this.linkCB3, "linkCB3");
this.linkCB3.Name = "linkCB3";
this.linkCB3.Tag = "2";
this.linkCB3.UseVisualStyleBackColor = true;
this.linkCB3.CheckedChanged += new System.EventHandler(this.linkCB_CheckedChanged);
//
// linkCB4
//
resources.ApplyResources(this.linkCB4, "linkCB4");
this.linkCB4.Name = "linkCB4";
this.linkCB4.Tag = "3";
this.linkCB4.UseVisualStyleBackColor = true;
this.linkCB4.CheckedChanged += new System.EventHandler(this.linkCB_CheckedChanged);
//
// lbNoControllers
//
resources.ApplyResources(this.lbNoControllers, "lbNoControllers");
@ -1302,7 +1349,6 @@
private System.Windows.Forms.Label lbSelectedProfile;
private System.Windows.Forms.Label lbID;
private System.Windows.Forms.Label lbStatus;
private System.Windows.Forms.Label lbBattery;
private System.Windows.Forms.Label lbBatt1;
private System.Windows.Forms.Label lbBatt2;
private System.Windows.Forms.Label lbBatt3;
@ -1383,6 +1429,12 @@
private System.Windows.Forms.RadioButton runStartProgRadio;
private System.Windows.Forms.RadioButton runStartTaskRadio;
private System.Windows.Forms.PictureBox uacPictureBox;
private System.Windows.Forms.Label lbBattery;
private System.Windows.Forms.Label lbLinkProfile;
private System.Windows.Forms.CheckBox linkCB1;
private System.Windows.Forms.CheckBox linkCB2;
private System.Windows.Forms.CheckBox linkCB3;
private System.Windows.Forms.CheckBox linkCB4;
//private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -149,25 +149,25 @@
<value>280, 24</value>
</data>
<data name="editProfileForController1ToolStripMenuItem.Text" xml:space="preserve">
<value>Editar perfil del Controlador 1</value>
<value>Editar perfil del Control 1</value>
</data>
<data name="editProfileForController2ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>280, 24</value>
</data>
<data name="editProfileForController2ToolStripMenuItem.Text" xml:space="preserve">
<value>Editar perfil del Controlador 2</value>
<value>Editar perfil del Control 2</value>
</data>
<data name="editProfileForController3ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>280, 24</value>
</data>
<data name="editProfileForController3ToolStripMenuItem.Text" xml:space="preserve">
<value>Editar perfil del Controlador 3</value>
<value>Editar perfil del Control 3</value>
</data>
<data name="editProfileForController4ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>280, 24</value>
</data>
<data name="editProfileForController4ToolStripMenuItem.Text" xml:space="preserve">
<value>Editar perfil del Controlador 4</value>
<value>Editar perfil del Control 4</value>
</data>
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
<value>277, 6</value>
@ -302,10 +302,10 @@
<value>34, 28</value>
</data>
<data name="lbNoControllers.Text" xml:space="preserve">
<value>Ningún controlador conectado (Máx 4)</value>
<value>Ningún control conectado (Máx 4)</value>
</data>
<data name="tabControllers.Text" xml:space="preserve">
<value>Controladores</value>
<value>Control</value>
</data>
<data name="editToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>240, 24</value>
@ -317,25 +317,25 @@
<value>240, 24</value>
</data>
<data name="assignToController1ToolStripMenuItem.Text" xml:space="preserve">
<value>Asignar al Controlador 1</value>
<value>Asignar al Control 1</value>
</data>
<data name="assignToController2ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>240, 24</value>
</data>
<data name="assignToController2ToolStripMenuItem.Text" xml:space="preserve">
<value>Asignar al Controlador 2</value>
<value>Asignar al Control 2</value>
</data>
<data name="assignToController3ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>240, 24</value>
</data>
<data name="assignToController3ToolStripMenuItem.Text" xml:space="preserve">
<value>Asignar al Controlador 3</value>
<value>Asignar al Control 3</value>
</data>
<data name="assignToController4ToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>240, 24</value>
</data>
<data name="assignToController4ToolStripMenuItem.Text" xml:space="preserve">
<value>Asignar al Controlador 4</value>
<value>Asignar al Control 4</value>
</data>
<data name="deleteToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>240, 24</value>
@ -464,13 +464,13 @@
<value>185, 21</value>
</data>
<data name="hideDS4CheckBox.Text" xml:space="preserve">
<value>Ocultar Controlador DS4</value>
<value>Ocultar Control DS4</value>
</data>
<data name="cBSwipeProfiles.Size" type="System.Drawing.Size, System.Drawing">
<value>305, 21</value>
</data>
<data name="cBSwipeProfiles.Text" xml:space="preserve">
<value>Deslizar el panel táctil para cambiar de perfil</value>
<value>Deslice el panel táctil para cambiar de perfil</value>
</data>
<data name="StartWindowsCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>198, 21</value>
@ -599,7 +599,7 @@
<value>235, 17</value>
</data>
<data name="linkSetup.Text" xml:space="preserve">
<value>Controlador/Configuración de Driver</value>
<value>Control/Configuración de Driver</value>
</data>
<data name="lLBUpdate.Size" type="System.Drawing.Size, System.Drawing">
<value>261, 17</value>

View File

@ -430,7 +430,7 @@
<value>NoControl</value>
</data>
<data name="btnConnectDS4Win10.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 127</value>
<value>0, 142</value>
</data>
<data name="btnConnectDS4Win10.Size" type="System.Drawing.Size, System.Drawing">
<value>896, 23</value>
@ -457,7 +457,7 @@
<value>True</value>
</data>
<data name="tLPControllers.ColumnCount" type="System.Int32, mscorlib">
<value>6</value>
<value>7</value>
</data>
<data name="bnLight3.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -469,10 +469,10 @@
<value>NoControl</value>
</data>
<data name="bnLight3.Location" type="System.Drawing.Point, System.Drawing">
<value>813, 74</value>
<value>794, 89</value>
</data>
<data name="bnLight3.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 22</value>
<value>99, 22</value>
</data>
<data name="bnLight3.TabIndex" type="System.Int32, mscorlib">
<value>50</value>
@ -496,7 +496,7 @@
<value>NoControl</value>
</data>
<data name="pBStatus1.Location" type="System.Drawing.Point, System.Drawing">
<value>386, 19</value>
<value>363, 34</value>
</data>
<data name="pBStatus1.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 20</value>
@ -532,7 +532,7 @@
<value>NoControl</value>
</data>
<data name="lbPad1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 21</value>
<value>3, 36</value>
</data>
<data name="lbPad1.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 15</value>
@ -568,7 +568,7 @@
<value>NoControl</value>
</data>
<data name="lbPad2.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 49</value>
<value>3, 64</value>
</data>
<data name="lbPad2.Size" type="System.Drawing.Size, System.Drawing">
<value>70, 15</value>
@ -598,10 +598,10 @@
<value>NoControl</value>
</data>
<data name="bnEditC3.Location" type="System.Drawing.Point, System.Drawing">
<value>770, 74</value>
<value>754, 89</value>
</data>
<data name="bnEditC3.Size" type="System.Drawing.Size, System.Drawing">
<value>37, 22</value>
<value>34, 22</value>
</data>
<data name="bnEditC3.TabIndex" type="System.Int32, mscorlib">
<value>43</value>
@ -628,10 +628,10 @@
<value>NoControl</value>
</data>
<data name="bnEditC4.Location" type="System.Drawing.Point, System.Drawing">
<value>770, 102</value>
<value>754, 117</value>
</data>
<data name="bnEditC4.Size" type="System.Drawing.Size, System.Drawing">
<value>37, 22</value>
<value>34, 22</value>
</data>
<data name="bnEditC4.TabIndex" type="System.Int32, mscorlib">
<value>43</value>
@ -664,7 +664,7 @@
<value>NoControl</value>
</data>
<data name="lbPad3.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 77</value>
<value>3, 92</value>
</data>
<data name="lbPad3.Size" type="System.Drawing.Size, System.Drawing">
<value>70, 15</value>
@ -700,7 +700,7 @@
<value>NoControl</value>
</data>
<data name="lbPad4.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 105</value>
<value>3, 120</value>
</data>
<data name="lbPad4.Size" type="System.Drawing.Size, System.Drawing">
<value>70, 15</value>
@ -727,7 +727,7 @@
<value>None</value>
</data>
<data name="cBController1.Location" type="System.Drawing.Point, System.Drawing">
<value>653, 18</value>
<value>637, 33</value>
</data>
<data name="cBController1.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 21</value>
@ -754,10 +754,10 @@
<value>NoControl</value>
</data>
<data name="bnEditC2.Location" type="System.Drawing.Point, System.Drawing">
<value>770, 46</value>
<value>754, 61</value>
</data>
<data name="bnEditC2.Size" type="System.Drawing.Size, System.Drawing">
<value>37, 22</value>
<value>34, 22</value>
</data>
<data name="bnEditC2.TabIndex" type="System.Int32, mscorlib">
<value>43</value>
@ -781,7 +781,7 @@
<value>None</value>
</data>
<data name="cBController2.Location" type="System.Drawing.Point, System.Drawing">
<value>653, 46</value>
<value>637, 61</value>
</data>
<data name="cBController2.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 21</value>
@ -805,7 +805,7 @@
<value>None</value>
</data>
<data name="cBController3.Location" type="System.Drawing.Point, System.Drawing">
<value>653, 74</value>
<value>637, 89</value>
</data>
<data name="cBController3.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 21</value>
@ -832,10 +832,10 @@
<value>NoControl</value>
</data>
<data name="bnEditC1.Location" type="System.Drawing.Point, System.Drawing">
<value>770, 18</value>
<value>754, 33</value>
</data>
<data name="bnEditC1.Size" type="System.Drawing.Size, System.Drawing">
<value>37, 22</value>
<value>34, 22</value>
</data>
<data name="bnEditC1.TabIndex" type="System.Int32, mscorlib">
<value>43</value>
@ -859,7 +859,7 @@
<value>None</value>
</data>
<data name="cBController4.Location" type="System.Drawing.Point, System.Drawing">
<value>653, 102</value>
<value>637, 117</value>
</data>
<data name="cBController4.Size" type="System.Drawing.Size, System.Drawing">
<value>111, 21</value>
@ -892,7 +892,7 @@
<value>NoControl</value>
</data>
<data name="lbSelectedProfile.Location" type="System.Drawing.Point, System.Drawing">
<value>654, 0</value>
<value>638, 7</value>
</data>
<data name="lbSelectedProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>109, 15</value>
@ -928,7 +928,7 @@
<value>NoControl</value>
</data>
<data name="lbID.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 0</value>
<value>3, 7</value>
</data>
<data name="lbID.Size" type="System.Drawing.Size, System.Drawing">
<value>21, 15</value>
@ -964,7 +964,7 @@
<value>NoControl</value>
</data>
<data name="lbStatus.Location" type="System.Drawing.Point, System.Drawing">
<value>382, 0</value>
<value>359, 7</value>
</data>
<data name="lbStatus.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 15</value>
@ -1000,7 +1000,7 @@
<value>NoControl</value>
</data>
<data name="lbBattery.Location" type="System.Drawing.Point, System.Drawing">
<value>546, 0</value>
<value>472, 7</value>
</data>
<data name="lbBattery.Size" type="System.Drawing.Size, System.Drawing">
<value>51, 15</value>
@ -1036,7 +1036,7 @@
<value>NoControl</value>
</data>
<data name="lbBatt1.Location" type="System.Drawing.Point, System.Drawing">
<value>552, 21</value>
<value>478, 36</value>
</data>
<data name="lbBatt1.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 15</value>
@ -1072,7 +1072,7 @@
<value>NoControl</value>
</data>
<data name="lbBatt2.Location" type="System.Drawing.Point, System.Drawing">
<value>552, 49</value>
<value>478, 64</value>
</data>
<data name="lbBatt2.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 15</value>
@ -1108,7 +1108,7 @@
<value>NoControl</value>
</data>
<data name="lbBatt3.Location" type="System.Drawing.Point, System.Drawing">
<value>552, 77</value>
<value>478, 92</value>
</data>
<data name="lbBatt3.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 15</value>
@ -1144,7 +1144,7 @@
<value>NoControl</value>
</data>
<data name="lbBatt4.Location" type="System.Drawing.Point, System.Drawing">
<value>552, 105</value>
<value>478, 120</value>
</data>
<data name="lbBatt4.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 15</value>
@ -1174,7 +1174,7 @@
<value>NoControl</value>
</data>
<data name="pBStatus2.Location" type="System.Drawing.Point, System.Drawing">
<value>386, 47</value>
<value>363, 62</value>
</data>
<data name="pBStatus2.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 20</value>
@ -1204,7 +1204,7 @@
<value>NoControl</value>
</data>
<data name="pBStatus3.Location" type="System.Drawing.Point, System.Drawing">
<value>386, 75</value>
<value>363, 90</value>
</data>
<data name="pBStatus3.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 20</value>
@ -1234,7 +1234,7 @@
<value>NoControl</value>
</data>
<data name="pBStatus4.Location" type="System.Drawing.Point, System.Drawing">
<value>386, 103</value>
<value>363, 118</value>
</data>
<data name="pBStatus4.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 20</value>
@ -1267,10 +1267,10 @@
<value>NoControl</value>
</data>
<data name="bnLight1.Location" type="System.Drawing.Point, System.Drawing">
<value>813, 18</value>
<value>794, 33</value>
</data>
<data name="bnLight1.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 22</value>
<value>99, 22</value>
</data>
<data name="bnLight1.TabIndex" type="System.Int32, mscorlib">
<value>50</value>
@ -1297,10 +1297,10 @@
<value>NoControl</value>
</data>
<data name="bnLight2.Location" type="System.Drawing.Point, System.Drawing">
<value>813, 46</value>
<value>794, 61</value>
</data>
<data name="bnLight2.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 22</value>
<value>99, 22</value>
</data>
<data name="bnLight2.TabIndex" type="System.Int32, mscorlib">
<value>51</value>
@ -1327,10 +1327,10 @@
<value>NoControl</value>
</data>
<data name="bnLight4.Location" type="System.Drawing.Point, System.Drawing">
<value>813, 102</value>
<value>794, 117</value>
</data>
<data name="bnLight4.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 22</value>
<value>99, 22</value>
</data>
<data name="bnLight4.TabIndex" type="System.Int32, mscorlib">
<value>52</value>
@ -1347,6 +1347,177 @@
<data name="&gt;&gt;bnLight4.ZOrder" xml:space="preserve">
<value>27</value>
</data>
<data name="lbLinkProfile.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="lbLinkProfile.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lbLinkProfile.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 9pt, style=Bold</value>
</data>
<data name="lbLinkProfile.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lbLinkProfile.Location" type="System.Drawing.Point, System.Drawing">
<value>560, 0</value>
</data>
<data name="lbLinkProfile.Size" type="System.Drawing.Size, System.Drawing">
<value>67, 30</value>
</data>
<data name="lbLinkProfile.TabIndex" type="System.Int32, mscorlib">
<value>53</value>
</data>
<data name="lbLinkProfile.Text" xml:space="preserve">
<value>Link Profile/ID</value>
</data>
<data name="lbLinkProfile.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
</data>
<data name="&gt;&gt;lbLinkProfile.Name" xml:space="preserve">
<value>lbLinkProfile</value>
</data>
<data name="&gt;&gt;lbLinkProfile.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbLinkProfile.Parent" xml:space="preserve">
<value>tLPControllers</value>
</data>
<data name="&gt;&gt;lbLinkProfile.ZOrder" xml:space="preserve">
<value>28</value>
</data>
<data name="linkCB1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="linkCB1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="linkCB1.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="linkCB1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="linkCB1.Location" type="System.Drawing.Point, System.Drawing">
<value>586, 37</value>
</data>
<data name="linkCB1.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value>
</data>
<data name="linkCB1.TabIndex" type="System.Int32, mscorlib">
<value>54</value>
</data>
<data name="&gt;&gt;linkCB1.Name" xml:space="preserve">
<value>linkCB1</value>
</data>
<data name="&gt;&gt;linkCB1.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;linkCB1.Parent" xml:space="preserve">
<value>tLPControllers</value>
</data>
<data name="&gt;&gt;linkCB1.ZOrder" xml:space="preserve">
<value>29</value>
</data>
<data name="linkCB2.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="linkCB2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="linkCB2.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="linkCB2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="linkCB2.Location" type="System.Drawing.Point, System.Drawing">
<value>586, 65</value>
</data>
<data name="linkCB2.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value>
</data>
<data name="linkCB2.TabIndex" type="System.Int32, mscorlib">
<value>55</value>
</data>
<data name="&gt;&gt;linkCB2.Name" xml:space="preserve">
<value>linkCB2</value>
</data>
<data name="&gt;&gt;linkCB2.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;linkCB2.Parent" xml:space="preserve">
<value>tLPControllers</value>
</data>
<data name="&gt;&gt;linkCB2.ZOrder" xml:space="preserve">
<value>30</value>
</data>
<data name="linkCB3.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="linkCB3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="linkCB3.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="linkCB3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="linkCB3.Location" type="System.Drawing.Point, System.Drawing">
<value>586, 93</value>
</data>
<data name="linkCB3.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value>
</data>
<data name="linkCB3.TabIndex" type="System.Int32, mscorlib">
<value>56</value>
</data>
<data name="&gt;&gt;linkCB3.Name" xml:space="preserve">
<value>linkCB3</value>
</data>
<data name="&gt;&gt;linkCB3.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;linkCB3.Parent" xml:space="preserve">
<value>tLPControllers</value>
</data>
<data name="&gt;&gt;linkCB3.ZOrder" xml:space="preserve">
<value>31</value>
</data>
<data name="linkCB4.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>None</value>
</data>
<data name="linkCB4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="linkCB4.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="linkCB4.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="linkCB4.Location" type="System.Drawing.Point, System.Drawing">
<value>586, 121</value>
</data>
<data name="linkCB4.Size" type="System.Drawing.Size, System.Drawing">
<value>15, 14</value>
</data>
<data name="linkCB4.TabIndex" type="System.Int32, mscorlib">
<value>57</value>
</data>
<data name="&gt;&gt;linkCB4.Name" xml:space="preserve">
<value>linkCB4</value>
</data>
<data name="&gt;&gt;linkCB4.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;linkCB4.Parent" xml:space="preserve">
<value>tLPControllers</value>
</data>
<data name="&gt;&gt;linkCB4.ZOrder" xml:space="preserve">
<value>32</value>
</data>
<data name="tLPControllers.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
@ -1357,7 +1528,7 @@
<value>5</value>
</data>
<data name="tLPControllers.Size" type="System.Drawing.Size, System.Drawing">
<value>896, 127</value>
<value>896, 142</value>
</data>
<data name="tLPControllers.TabIndex" type="System.Int32, mscorlib">
<value>46</value>
@ -1375,7 +1546,7 @@
<value>1</value>
</data>
<data name="tLPControllers.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="bnLight3" Row="3" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus1" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbPad1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPad2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC3" Row="3" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC4" Row="4" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="lbPad3" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPad4" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="cBController1" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC2" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="cBController2" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="cBController3" Row="3" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC1" Row="1" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="cBController4" Row="4" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="lbSelectedProfile" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="lbID" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbStatus" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbBattery" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt1" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt2" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt3" Row="3" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt4" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus2" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus3" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus4" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="bnLight1" Row="1" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="bnLight2" Row="2" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="bnLight4" Row="4" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,48.95498,Percent,26.82658,Percent,24.21844,AutoSize,0,AutoSize,0,Absolute,84" /&gt;&lt;Rows Styles="AutoSize,0,Percent,25,Percent,25,Percent,25,Percent,25" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="bnLight3" Row="3" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus1" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbPad1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPad2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC3" Row="3" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC4" Row="4" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="lbPad3" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPad4" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="cBController1" Row="1" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC2" Row="2" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="cBController2" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="cBController3" Row="3" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="bnEditC1" Row="1" RowSpan="1" Column="5" ColumnSpan="1" /&gt;&lt;Control Name="cBController4" Row="4" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="lbSelectedProfile" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /&gt;&lt;Control Name="lbID" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbStatus" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbBattery" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt1" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt2" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt3" Row="3" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="lbBatt4" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus2" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus3" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pBStatus4" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="bnLight1" Row="1" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="bnLight2" Row="2" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="bnLight4" Row="4" RowSpan="1" Column="6" ColumnSpan="1" /&gt;&lt;Control Name="lbLinkProfile" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB1" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB2" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB3" Row="3" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="linkCB4" Row="4" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,58.35329,Percent,21.22288,Percent,20.42383,Absolute,80,AutoSize,0,Absolute,40,Absolute,103" /&gt;&lt;Rows Styles="AutoSize,0,Percent,25,Percent,25,Percent,25,Percent,25" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="lbNoControllers.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -2971,7 +3142,7 @@
<value>904, 415</value>
</data>
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>459, 229</value>
<value>630, 229</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>DS4Windows</value>
@ -3214,7 +3385,7 @@
<value>advColorDialog</value>
</data>
<data name="&gt;&gt;advColorDialog.Type" xml:space="preserve">
<value>DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.4.70.0, Culture=neutral, PublicKeyToken=null</value>
<value>DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.4.99.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>DS4Form</value>

View File

@ -121,7 +121,7 @@
<value>Guardar</value>
</data>
<data name="tBProfile.Text" xml:space="preserve">
<value>&lt;Escribe nuevo nombre aqui&gt;</value>
<value>&lt;Escribe el nuevo nombre aqui&gt;</value>
</data>
<data name="btnCancel.Text" xml:space="preserve">
<value>Cancelar</value>

View File

@ -63,7 +63,7 @@ namespace DS4Windows
private void linkJays2Kings_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("http://ds4windows.com");
Process.Start("https://github.com/Jays2Kings/");
}
private void linkElectro_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
@ -88,13 +88,11 @@ namespace DS4Windows
private void linkDonate_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
//Process.Start("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=2FTZ9BZEHSQ8Q&lc=US&item_name=DS4Windows&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted");
Process.Start("https://paypal.me/ryochan7");
}
private void linkSourceCode_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
//Process.Start("https://github.com/Jays2Kings/DS4Windows");
Process.Start("https://github.com/Ryochan7/DS4Windows");
}

View File

@ -140,23 +140,23 @@
<value>540, 458</value>
</data>
<data name="lbHotkeys.Text" xml:space="preserve">
<value>Ocultar Controlador DS4: Hides the DS4's regular input (Dinput) from other programs, check if you are getting double input in games or R2 pauses games
Click left side of touchpad: Left Touch
Click right side of touchpad: Right Touch
Click touchpad with 2 fingers: Multitouch
Click upper part of touchpad: Upper Touch
PS + Options o mantener PS por 10 segundos: Desconectar Controlador (Solo Bluetooth)
Tocar Touchpad + PS: Turn off touchpad movement (clicking still works)
Pad click on lower right: Right click (Best used when right side is used as a mouse button)
Two fingers up/down on touchpad*: Scroll Up/Down
Tap then hold touchpad*: Left mouse drag
2 finger touchpad swipe left or right: Cycle through profiles
Shift Modifer: Hold an action to use another set of controls
When mapping keyboard and mouse:
Toggle: The key will remain in a ""held down"" state until pressed again
Macro: Assign multiple keys to one input
Scan Code: Keys are interpreted differently. May be needed for certain games
*If enabled</value>
<value>Ocultar Control DS4: Oculta la entrada regular del DS4 (Dinput) de otros programas, comprueba si tienes doble entrada en juegos o que R2 pause juegos
Haga clic en el lado izquierdo del panel táctil: Toque izquierdo
Haga clic en el lado derecho del panel táctil: Toque derecho
Haga clic en el panel táctil con 2 dedos: Multi toque
Haga clic en la parte superior del panel táctil: Toque superior
PS + Options o mantener PS por 10 segundos: Desconectar Control (Solo Bluetooth)
Clic en el panel táctil + PS: Desactiva el movimiento del panel táctil (el clic sigue funcionando)
Clic en la parte inferior derecha del panel: Haga clic derecho (Mejor utilizado cuando el lado derecho se utiliza como un botón del ratón)
Dos dedos arriba / abajo en el panel táctil*: Desplazar hacia arriba / abajo
Toque y mantenga pulsado el panel táctil*: Arrastrar el ratón hacia la izquierda
Deslizar el dedo hacia la izquierda o la derecha: Ciclo a través de perfiles
Modificador de cambio: Realizar una acción para utilizar otro conjunto de controles
Al asignar el teclado y el ratón:
Palanca: La tecla permanecerá en estado "" presionado "" hasta que se vuelva a pulsar
Macro: Asignar varias teclas a una entrada
Código de exploración: Las claves se interpretan de manera diferente. Puede ser necesario para ciertos juegos
*Si está activado</value>
</data>
<data name="tPHotkeys.Size" type="System.Drawing.Size, System.Drawing">
<value>563, 386</value>

View File

@ -190,7 +190,7 @@
<value>0</value>
</data>
<data name="lbAbout.Text" xml:space="preserve">
<value>DS4Windows - Jays2Kings Build (Version</value>
<value>DS4Windows - Ryochan7 Build (Version</value>
</data>
<data name="lbAbout.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>TopCenter</value>
@ -483,685 +483,6 @@
<data name="tLPTranslators.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;lbuk.Name" xml:space="preserve">
<value>lbuk</value>
</data>
<data name="&gt;&gt;lbuk.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbuk.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbuk.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;lbUkrainianT.Name" xml:space="preserve">
<value>lbUkrainianT</value>
</data>
<data name="&gt;&gt;lbUkrainianT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbUkrainianT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbUkrainianT.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;lbid.Name" xml:space="preserve">
<value>lbid</value>
</data>
<data name="&gt;&gt;lbid.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbid.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbid.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;lbIndonesianT.Name" xml:space="preserve">
<value>lbIndonesianT</value>
</data>
<data name="&gt;&gt;lbIndonesianT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbIndonesianT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbIndonesianT.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;lbhu.Name" xml:space="preserve">
<value>lbhu</value>
</data>
<data name="&gt;&gt;lbhu.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbhu.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbhu.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="&gt;&gt;lbHungarianT.Name" xml:space="preserve">
<value>lbHungarianT</value>
</data>
<data name="&gt;&gt;lbHungarianT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbHungarianT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbHungarianT.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="&gt;&gt;lbel.Name" xml:space="preserve">
<value>lbel</value>
</data>
<data name="&gt;&gt;lbel.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbel.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbel.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="&gt;&gt;lbGreekT.Name" xml:space="preserve">
<value>lbGreekT</value>
</data>
<data name="&gt;&gt;lbGreekT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbGreekT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbGreekT.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="&gt;&gt;lbfi.Name" xml:space="preserve">
<value>lbfi</value>
</data>
<data name="&gt;&gt;lbfi.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbfi.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbfi.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="&gt;&gt;lbFinnishT.Name" xml:space="preserve">
<value>lbFinnishT</value>
</data>
<data name="&gt;&gt;lbFinnishT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbFinnishT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbFinnishT.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="&gt;&gt;lbcs.Name" xml:space="preserve">
<value>lbcs</value>
</data>
<data name="&gt;&gt;lbcs.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbcs.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbcs.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="&gt;&gt;lbCzechT.Name" xml:space="preserve">
<value>lbCzechT</value>
</data>
<data name="&gt;&gt;lbCzechT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbCzechT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbCzechT.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="&gt;&gt;lbpt.Name" xml:space="preserve">
<value>lbpt</value>
</data>
<data name="&gt;&gt;lbpt.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbpt.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbpt.ZOrder" xml:space="preserve">
<value>12</value>
</data>
<data name="&gt;&gt;lbPortugueseT.Name" xml:space="preserve">
<value>lbPortugueseT</value>
</data>
<data name="&gt;&gt;lbPortugueseT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbPortugueseT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbPortugueseT.ZOrder" xml:space="preserve">
<value>13</value>
</data>
<data name="&gt;&gt;lbes.Name" xml:space="preserve">
<value>lbes</value>
</data>
<data name="&gt;&gt;lbes.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbes.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbes.ZOrder" xml:space="preserve">
<value>14</value>
</data>
<data name="&gt;&gt;lbSpanishT.Name" xml:space="preserve">
<value>lbSpanishT</value>
</data>
<data name="&gt;&gt;lbSpanishT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbSpanishT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbSpanishT.ZOrder" xml:space="preserve">
<value>15</value>
</data>
<data name="&gt;&gt;lbpl.Name" xml:space="preserve">
<value>lbpl</value>
</data>
<data name="&gt;&gt;lbpl.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbpl.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbpl.ZOrder" xml:space="preserve">
<value>16</value>
</data>
<data name="&gt;&gt;lbPolishT.Name" xml:space="preserve">
<value>lbPolishT</value>
</data>
<data name="&gt;&gt;lbPolishT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbPolishT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbPolishT.ZOrder" xml:space="preserve">
<value>17</value>
</data>
<data name="&gt;&gt;lbde.Name" xml:space="preserve">
<value>lbde</value>
</data>
<data name="&gt;&gt;lbde.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbde.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbde.ZOrder" xml:space="preserve">
<value>18</value>
</data>
<data name="&gt;&gt;lbGermanT.Name" xml:space="preserve">
<value>lbGermanT</value>
</data>
<data name="&gt;&gt;lbGermanT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbGermanT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbGermanT.ZOrder" xml:space="preserve">
<value>19</value>
</data>
<data name="&gt;&gt;lbItalianT.Name" xml:space="preserve">
<value>lbItalianT</value>
</data>
<data name="&gt;&gt;lbItalianT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbItalianT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbItalianT.ZOrder" xml:space="preserve">
<value>20</value>
</data>
<data name="&gt;&gt;lbitIT.Name" xml:space="preserve">
<value>lbitIT</value>
</data>
<data name="&gt;&gt;lbitIT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbitIT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbitIT.ZOrder" xml:space="preserve">
<value>21</value>
</data>
<data name="&gt;&gt;lbruRU.Name" xml:space="preserve">
<value>lbruRU</value>
</data>
<data name="&gt;&gt;lbruRU.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbruRU.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbruRU.ZOrder" xml:space="preserve">
<value>22</value>
</data>
<data name="&gt;&gt;lbRussianT.Name" xml:space="preserve">
<value>lbRussianT</value>
</data>
<data name="&gt;&gt;lbRussianT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbRussianT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbRussianT.ZOrder" xml:space="preserve">
<value>23</value>
</data>
<data name="&gt;&gt;lbroRO.Name" xml:space="preserve">
<value>lbroRO</value>
</data>
<data name="&gt;&gt;lbroRO.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbroRO.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbroRO.ZOrder" xml:space="preserve">
<value>24</value>
</data>
<data name="&gt;&gt;lbRomanianT.Name" xml:space="preserve">
<value>lbRomanianT</value>
</data>
<data name="&gt;&gt;lbRomanianT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbRomanianT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbRomanianT.ZOrder" xml:space="preserve">
<value>25</value>
</data>
<data name="&gt;&gt;lbtr.Name" xml:space="preserve">
<value>lbtr</value>
</data>
<data name="&gt;&gt;lbtr.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbtr.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbtr.ZOrder" xml:space="preserve">
<value>26</value>
</data>
<data name="&gt;&gt;lbTurkishT.Name" xml:space="preserve">
<value>lbTurkishT</value>
</data>
<data name="&gt;&gt;lbTurkishT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbTurkishT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbTurkishT.ZOrder" xml:space="preserve">
<value>27</value>
</data>
<data name="&gt;&gt;lbzhHans.Name" xml:space="preserve">
<value>lbzhHans</value>
</data>
<data name="&gt;&gt;lbzhHans.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbzhHans.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbzhHans.ZOrder" xml:space="preserve">
<value>28</value>
</data>
<data name="&gt;&gt;lbChineseST.Name" xml:space="preserve">
<value>lbChineseST</value>
</data>
<data name="&gt;&gt;lbChineseST.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbChineseST.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbChineseST.ZOrder" xml:space="preserve">
<value>29</value>
</data>
<data name="&gt;&gt;lbzhHant.Name" xml:space="preserve">
<value>lbzhHant</value>
</data>
<data name="&gt;&gt;lbzhHant.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbzhHant.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbzhHant.ZOrder" xml:space="preserve">
<value>30</value>
</data>
<data name="&gt;&gt;lbChineseTT.Name" xml:space="preserve">
<value>lbChineseTT</value>
</data>
<data name="&gt;&gt;lbChineseTT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbChineseTT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbChineseTT.ZOrder" xml:space="preserve">
<value>31</value>
</data>
<data name="&gt;&gt;lbar.Name" xml:space="preserve">
<value>lbar</value>
</data>
<data name="&gt;&gt;lbar.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbar.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbar.ZOrder" xml:space="preserve">
<value>32</value>
</data>
<data name="&gt;&gt;lbArabicT.Name" xml:space="preserve">
<value>lbArabicT</value>
</data>
<data name="&gt;&gt;lbArabicT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbArabicT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbArabicT.ZOrder" xml:space="preserve">
<value>33</value>
</data>
<data name="&gt;&gt;lbhe.Name" xml:space="preserve">
<value>lbhe</value>
</data>
<data name="&gt;&gt;lbhe.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbhe.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbhe.ZOrder" xml:space="preserve">
<value>34</value>
</data>
<data name="&gt;&gt;lbHebrewT.Name" xml:space="preserve">
<value>lbHebrewT</value>
</data>
<data name="&gt;&gt;lbHebrewT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbHebrewT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbHebrewT.ZOrder" xml:space="preserve">
<value>35</value>
</data>
<data name="&gt;&gt;lbfrFR.Name" xml:space="preserve">
<value>lbfrFR</value>
</data>
<data name="&gt;&gt;lbfrFR.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbfrFR.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbfrFR.ZOrder" xml:space="preserve">
<value>36</value>
</data>
<data name="&gt;&gt;lbFrenchT.Name" xml:space="preserve">
<value>lbFrenchT</value>
</data>
<data name="&gt;&gt;lbFrenchT.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbFrenchT.Parent" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;lbFrenchT.ZOrder" xml:space="preserve">
<value>37</value>
</data>
<data name="tLPTranslators.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="tLPTranslators.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 130</value>
</data>
<data name="tLPTranslators.RowCount" type="System.Int32, mscorlib">
<value>19</value>
</data>
<data name="tLPTranslators.Size" type="System.Drawing.Size, System.Drawing">
<value>553, 301</value>
</data>
<data name="tLPTranslators.TabIndex" type="System.Int32, mscorlib">
<value>19</value>
</data>
<data name="&gt;&gt;tLPTranslators.Name" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;tLPTranslators.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tLPTranslators.Parent" xml:space="preserve">
<value>tPCredits</value>
</data>
<data name="&gt;&gt;tLPTranslators.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="tLPTranslators.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="lbuk" Row="18" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbUkrainianT" Row="18" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbid" Row="17" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbIndonesianT" Row="17" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbhu" Row="16" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbHungarianT" Row="16" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbel" Row="15" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbGreekT" Row="15" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbfi" Row="14" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbFinnishT" Row="14" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbcs" Row="13" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbCzechT" Row="13" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbpt" Row="12" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPortugueseT" Row="12" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbes" Row="11" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbSpanishT" Row="11" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbpl" Row="10" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPolishT" Row="10" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbde" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbGermanT" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbItalianT" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbitIT" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbruRU" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbRussianT" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbroRO" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbRomanianT" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbtr" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbTurkishT" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbzhHans" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbChineseST" Row="5" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbzhHant" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbChineseTT" Row="6" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbar" Row="7" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbArabicT" Row="7" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbhe" Row="8" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbHebrewT" Row="8" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbfrFR" Row="9" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbFrenchT" Row="9" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0" /&gt;&lt;Rows Styles="Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Absolute,16,Absolute,16,Absolute,16,Absolute,16,Absolute,16,Absolute,16,Absolute,16" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="lbTranslators.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
</data>
<data name="lbTranslators.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lbTranslators.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lbTranslators.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 114</value>
</data>
<data name="lbTranslators.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 13</value>
</data>
<data name="lbTranslators.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="lbTranslators.Text" xml:space="preserve">
<value>Translators</value>
</data>
<data name="&gt;&gt;lbTranslators.Name" xml:space="preserve">
<value>lbTranslators</value>
</data>
<data name="&gt;&gt;lbTranslators.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbTranslators.Parent" xml:space="preserve">
<value>tPCredits</value>
</data>
<data name="&gt;&gt;lbTranslators.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="linkSourceCode.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="linkSourceCode.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="linkSourceCode.Location" type="System.Drawing.Point, System.Drawing">
<value>72, 3</value>
</data>
<data name="linkSourceCode.Size" type="System.Drawing.Size, System.Drawing">
<value>69, 13</value>
</data>
<data name="linkSourceCode.TabIndex" type="System.Int32, mscorlib">
<value>18</value>
</data>
<data name="linkSourceCode.Text" xml:space="preserve">
<value>Source Code</value>
</data>
<data name="&gt;&gt;linkSourceCode.Name" xml:space="preserve">
<value>linkSourceCode</value>
</data>
<data name="&gt;&gt;linkSourceCode.Type" xml:space="preserve">
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;linkSourceCode.Parent" xml:space="preserve">
<value>tPCredits</value>
</data>
<data name="&gt;&gt;linkSourceCode.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="lbLinkText.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lbLinkText.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="lbLinkText.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lbLinkText.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 431</value>
</data>
<data name="lbLinkText.Size" type="System.Drawing.Size, System.Drawing">
<value>103, 13</value>
</data>
<data name="lbLinkText.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="lbLinkText.Text" xml:space="preserve">
<value>Links displayed here</value>
</data>
<data name="&gt;&gt;lbLinkText.Name" xml:space="preserve">
<value>lbLinkText</value>
</data>
<data name="&gt;&gt;lbLinkText.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbLinkText.Parent" xml:space="preserve">
<value>tPCredits</value>
</data>
<data name="&gt;&gt;lbLinkText.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="tPCredits.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="tPCredits.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tPCredits.Size" type="System.Drawing.Size, System.Drawing">
<value>559, 447</value>
</data>
<data name="tPCredits.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tPCredits.Text" xml:space="preserve">
<value>Credits</value>
</data>
<data name="&gt;&gt;tPCredits.Name" xml:space="preserve">
<value>tPCredits</value>
</data>
<data name="&gt;&gt;tPCredits.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tPCredits.Parent" xml:space="preserve">
<value>tCAbout</value>
</data>
<data name="&gt;&gt;tPCredits.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tCAbout.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tCAbout.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 36</value>
</data>
<data name="tCAbout.Size" type="System.Drawing.Size, System.Drawing">
<value>567, 473</value>
</data>
<data name="tCAbout.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="&gt;&gt;tCAbout.Name" xml:space="preserve">
<value>tCAbout</value>
</data>
<data name="&gt;&gt;tCAbout.Type" xml:space="preserve">
<value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tCAbout.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tCAbout.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="lbHotkeys.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="lbHotkeys.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lbHotkeys.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="lbHotkeys.Size" type="System.Drawing.Size, System.Drawing">
<value>536, 454</value>
</data>
<data name="lbHotkeys.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="lbHotkeys.Text" xml:space="preserve">
<value>Hide DS4 Controller: Hides the DS4's regular input (Dinput) from other programs, check if you are getting double input in games or R2 pauses games
Click left side of touchpad: Left Touch
Click right side of touchpad: Right Touch
Click touchpad with 2 fingers: Multitouch
Click upper part of touchpad: Upper Touch
PS + Options or hold PS for 10 secs: Disconnect Controller (Only on Bluetooth)
Touch Touchpad + PS: Turn off touchpad movement (clicking still works)
Pad click on lower right: Right click (Best used when right side is used as a mouse button)
Two fingers up/down on touchpad*: Scroll Up/Down
Tap then hold touchpad*: Left mouse drag
2 finger touchpad swipe left or right: Cycle through profiles
Shift Modifer: Hold an action to use another set of controls
When mapping keyboard and mouse:
Toggle: The key will remain in a "held down" state until pressed again
Macro: Assign multiple keys to one input
Scan Code: Keys are interpreted differently. May be needed for certain games
*If enabled</value>
</data>
<data name="&gt;&gt;lbHotkeys.Name" xml:space="preserve">
<value>lbHotkeys</value>
</data>
<data name="&gt;&gt;lbHotkeys.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbHotkeys.Parent" xml:space="preserve">
<value>tPHotkeys</value>
</data>
<data name="&gt;&gt;lbHotkeys.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="lbuk.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@ -2362,6 +1683,229 @@ Scan Code: Keys are interpreted differently. May be needed for certain games
<data name="&gt;&gt;lbFrenchT.ZOrder" xml:space="preserve">
<value>37</value>
</data>
<data name="tLPTranslators.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="tLPTranslators.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 130</value>
</data>
<data name="tLPTranslators.RowCount" type="System.Int32, mscorlib">
<value>19</value>
</data>
<data name="tLPTranslators.Size" type="System.Drawing.Size, System.Drawing">
<value>553, 301</value>
</data>
<data name="tLPTranslators.TabIndex" type="System.Int32, mscorlib">
<value>19</value>
</data>
<data name="&gt;&gt;tLPTranslators.Name" xml:space="preserve">
<value>tLPTranslators</value>
</data>
<data name="&gt;&gt;tLPTranslators.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tLPTranslators.Parent" xml:space="preserve">
<value>tPCredits</value>
</data>
<data name="&gt;&gt;tLPTranslators.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="tLPTranslators.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="lbuk" Row="18" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbUkrainianT" Row="18" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbid" Row="17" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbIndonesianT" Row="17" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbhu" Row="16" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbHungarianT" Row="16" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbel" Row="15" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbGreekT" Row="15" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbfi" Row="14" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbFinnishT" Row="14" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbcs" Row="13" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbCzechT" Row="13" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbpt" Row="12" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPortugueseT" Row="12" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbes" Row="11" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbSpanishT" Row="11" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbpl" Row="10" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbPolishT" Row="10" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbde" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbGermanT" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbItalianT" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbitIT" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbruRU" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbRussianT" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbroRO" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbRomanianT" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbtr" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbTurkishT" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbzhHans" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbChineseST" Row="5" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbzhHant" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbChineseTT" Row="6" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbar" Row="7" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbArabicT" Row="7" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbhe" Row="8" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbHebrewT" Row="8" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lbfrFR" Row="9" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lbFrenchT" Row="9" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0" /&gt;&lt;Rows Styles="Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Percent,8.333333,Absolute,16,Absolute,16,Absolute,16,Absolute,16,Absolute,16,Absolute,16,Absolute,16" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="lbTranslators.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
</data>
<data name="lbTranslators.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lbTranslators.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lbTranslators.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 114</value>
</data>
<data name="lbTranslators.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 13</value>
</data>
<data name="lbTranslators.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="lbTranslators.Text" xml:space="preserve">
<value>Translators</value>
</data>
<data name="&gt;&gt;lbTranslators.Name" xml:space="preserve">
<value>lbTranslators</value>
</data>
<data name="&gt;&gt;lbTranslators.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbTranslators.Parent" xml:space="preserve">
<value>tPCredits</value>
</data>
<data name="&gt;&gt;lbTranslators.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="linkSourceCode.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="linkSourceCode.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="linkSourceCode.Location" type="System.Drawing.Point, System.Drawing">
<value>72, 3</value>
</data>
<data name="linkSourceCode.Size" type="System.Drawing.Size, System.Drawing">
<value>69, 13</value>
</data>
<data name="linkSourceCode.TabIndex" type="System.Int32, mscorlib">
<value>18</value>
</data>
<data name="linkSourceCode.Text" xml:space="preserve">
<value>Source Code</value>
</data>
<data name="&gt;&gt;linkSourceCode.Name" xml:space="preserve">
<value>linkSourceCode</value>
</data>
<data name="&gt;&gt;linkSourceCode.Type" xml:space="preserve">
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;linkSourceCode.Parent" xml:space="preserve">
<value>tPCredits</value>
</data>
<data name="&gt;&gt;linkSourceCode.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="lbLinkText.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lbLinkText.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="lbLinkText.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lbLinkText.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 431</value>
</data>
<data name="lbLinkText.Size" type="System.Drawing.Size, System.Drawing">
<value>103, 13</value>
</data>
<data name="lbLinkText.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="lbLinkText.Text" xml:space="preserve">
<value>Links displayed here</value>
</data>
<data name="&gt;&gt;lbLinkText.Name" xml:space="preserve">
<value>lbLinkText</value>
</data>
<data name="&gt;&gt;lbLinkText.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbLinkText.Parent" xml:space="preserve">
<value>tPCredits</value>
</data>
<data name="&gt;&gt;lbLinkText.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="tPCredits.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="tPCredits.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tPCredits.Size" type="System.Drawing.Size, System.Drawing">
<value>559, 447</value>
</data>
<data name="tPCredits.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tPCredits.Text" xml:space="preserve">
<value>Credits</value>
</data>
<data name="&gt;&gt;tPCredits.Name" xml:space="preserve">
<value>tPCredits</value>
</data>
<data name="&gt;&gt;tPCredits.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tPCredits.Parent" xml:space="preserve">
<value>tCAbout</value>
</data>
<data name="&gt;&gt;tPCredits.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tCAbout.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tCAbout.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 36</value>
</data>
<data name="tCAbout.Size" type="System.Drawing.Size, System.Drawing">
<value>567, 473</value>
</data>
<data name="tCAbout.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="&gt;&gt;tCAbout.Name" xml:space="preserve">
<value>tCAbout</value>
</data>
<data name="&gt;&gt;tCAbout.Type" xml:space="preserve">
<value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tCAbout.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tCAbout.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="lbHotkeys.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="lbHotkeys.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lbHotkeys.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="lbHotkeys.Size" type="System.Drawing.Size, System.Drawing">
<value>536, 454</value>
</data>
<data name="lbHotkeys.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="lbHotkeys.Text" xml:space="preserve">
<value>Hide DS4 Controller: Hides the DS4's regular input (Dinput) from other programs, check if you are getting double input in games or R2 pauses games
Click left side of touchpad: Left Touch
Click right side of touchpad: Right Touch
Click touchpad with 2 fingers: Multitouch
Click upper part of touchpad: Upper Touch
PS + Options or hold PS for 10 secs: Disconnect Controller (Only on Bluetooth)
Touch Touchpad + PS: Turn off touchpad movement (clicking still works)
Pad click on lower right: Right click (Best used when right side is used as a mouse button)
Two fingers up/down on touchpad*: Scroll Up/Down
Tap then hold touchpad*: Left mouse drag
2 finger touchpad swipe left or right: Cycle through profiles
Shift Modifer: Hold an action to use another set of controls
When mapping keyboard and mouse:
Toggle: The key will remain in a "held down" state until pressed again
Macro: Assign multiple keys to one input
Scan Code: Keys are interpreted differently. May be needed for certain games
*If enabled</value>
</data>
<data name="&gt;&gt;lbHotkeys.Name" xml:space="preserve">
<value>lbHotkeys</value>
</data>
<data name="&gt;&gt;lbHotkeys.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbHotkeys.Parent" xml:space="preserve">
<value>tPHotkeys</value>
</data>
<data name="&gt;&gt;lbHotkeys.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View File

@ -161,7 +161,7 @@
<value>105, 17</value>
</data>
<data name="X360Label.Text" xml:space="preserve">
<value>Controles X360</value>
<value>Controles Xbox 360</value>
</data>
<data name="KBMlabel.Size" type="System.Drawing.Size, System.Drawing">
<value>112, 17</value>

View File

@ -76,6 +76,8 @@
this.nUDL2 = new System.Windows.Forms.NumericUpDown();
this.gBTouchpad = new System.Windows.Forms.GroupBox();
this.pnlTPMouse = new System.Windows.Forms.Panel();
this.touchpadDisInvertButton = new System.Windows.Forms.Button();
this.label25 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.touchpadInvertComboBox = new System.Windows.Forms.ComboBox();
this.cbStartTouchpadOff = new System.Windows.Forms.CheckBox();
@ -361,6 +363,26 @@
this.shareToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pSToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.alwaysOnToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.cMTouchDisableInvert = new System.Windows.Forms.ContextMenuStrip(this.components);
this.crossTouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.circleTouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.squareTouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.triangleTouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.l1TouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.l2TouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.r1TouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.r2TouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.upTouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.downTouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.leftTouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.rightTouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.l3TouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.r3TouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.oneFingerTouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.twoFingerTouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.optionsTouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.shareTouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.psTouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.advColorDialog = new DS4Windows.AdvancedColorDialog();
((System.ComponentModel.ISupportInitialize)(this.nUDRainbow)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tBBlueBar)).BeginInit();
@ -453,6 +475,7 @@
((System.ComponentModel.ISupportInitialize)(this.nUDSXS)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nUDSZS)).BeginInit();
this.cMGyroTriggers.SuspendLayout();
this.cMTouchDisableInvert.SuspendLayout();
this.SuspendLayout();
//
// lowColorChooserButton
@ -649,8 +672,6 @@
// cBTouchpadJitterCompensation
//
resources.ApplyResources(this.cBTouchpadJitterCompensation, "cBTouchpadJitterCompensation");
this.cBTouchpadJitterCompensation.Checked = true;
this.cBTouchpadJitterCompensation.CheckState = System.Windows.Forms.CheckState.Checked;
this.cBTouchpadJitterCompensation.ForeColor = System.Drawing.SystemColors.ControlLightLight;
this.cBTouchpadJitterCompensation.Name = "cBTouchpadJitterCompensation";
this.cBTouchpadJitterCompensation.UseVisualStyleBackColor = true;
@ -911,6 +932,8 @@
//
// pnlTPMouse
//
this.pnlTPMouse.Controls.Add(this.touchpadDisInvertButton);
this.pnlTPMouse.Controls.Add(this.label25);
this.pnlTPMouse.Controls.Add(this.label15);
this.pnlTPMouse.Controls.Add(this.touchpadInvertComboBox);
this.pnlTPMouse.Controls.Add(this.nUDScroll);
@ -926,6 +949,19 @@
resources.ApplyResources(this.pnlTPMouse, "pnlTPMouse");
this.pnlTPMouse.Name = "pnlTPMouse";
//
// touchpadDisInvertButton
//
this.touchpadDisInvertButton.ForeColor = System.Drawing.SystemColors.ControlText;
resources.ApplyResources(this.touchpadDisInvertButton, "touchpadDisInvertButton");
this.touchpadDisInvertButton.Name = "touchpadDisInvertButton";
this.touchpadDisInvertButton.UseVisualStyleBackColor = true;
this.touchpadDisInvertButton.Click += new System.EventHandler(this.touchpadDisInvertButton_Click);
//
// label25
//
resources.ApplyResources(this.label25, "label25");
this.label25.Name = "label25";
//
// label15
//
resources.ApplyResources(this.label15, "label15");
@ -3875,6 +3911,166 @@
resources.ApplyResources(this.alwaysOnToolStripMenuItem, "alwaysOnToolStripMenuItem");
this.alwaysOnToolStripMenuItem.CheckedChanged += new System.EventHandler(this.SATrigger_CheckedChanged);
//
// cMTouchDisableInvert
//
this.cMTouchDisableInvert.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.crossTouchInvStripMenuItem,
this.circleTouchInvStripMenuItem,
this.squareTouchInvStripMenuItem,
this.triangleTouchInvStripMenuItem,
this.l1TouchInvStripMenuItem,
this.l2TouchInvStripMenuItem,
this.r1TouchInvStripMenuItem,
this.r2TouchInvStripMenuItem,
this.upTouchInvStripMenuItem,
this.downTouchInvStripMenuItem,
this.leftTouchInvStripMenuItem,
this.rightTouchInvStripMenuItem,
this.l3TouchInvStripMenuItem,
this.r3TouchInvStripMenuItem,
this.oneFingerTouchInvStripMenuItem,
this.twoFingerTouchInvStripMenuItem,
this.optionsTouchInvStripMenuItem,
this.shareTouchInvStripMenuItem,
this.psTouchInvStripMenuItem});
this.cMTouchDisableInvert.Name = "cMTouchDisableInvert";
this.cMTouchDisableInvert.ShowCheckMargin = true;
this.cMTouchDisableInvert.ShowImageMargin = false;
resources.ApplyResources(this.cMTouchDisableInvert, "cMTouchDisableInvert");
//
// crossTouchInvStripMenuItem
//
this.crossTouchInvStripMenuItem.CheckOnClick = true;
this.crossTouchInvStripMenuItem.Name = "crossTouchInvStripMenuItem";
resources.ApplyResources(this.crossTouchInvStripMenuItem, "crossTouchInvStripMenuItem");
this.crossTouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// circleTouchInvStripMenuItem
//
this.circleTouchInvStripMenuItem.CheckOnClick = true;
this.circleTouchInvStripMenuItem.Name = "circleTouchInvStripMenuItem";
resources.ApplyResources(this.circleTouchInvStripMenuItem, "circleTouchInvStripMenuItem");
this.circleTouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// squareTouchInvStripMenuItem
//
this.squareTouchInvStripMenuItem.CheckOnClick = true;
this.squareTouchInvStripMenuItem.Name = "squareTouchInvStripMenuItem";
resources.ApplyResources(this.squareTouchInvStripMenuItem, "squareTouchInvStripMenuItem");
this.squareTouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// triangleTouchInvStripMenuItem
//
this.triangleTouchInvStripMenuItem.CheckOnClick = true;
this.triangleTouchInvStripMenuItem.Name = "triangleTouchInvStripMenuItem";
resources.ApplyResources(this.triangleTouchInvStripMenuItem, "triangleTouchInvStripMenuItem");
this.triangleTouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// l1TouchInvStripMenuItem
//
this.l1TouchInvStripMenuItem.CheckOnClick = true;
this.l1TouchInvStripMenuItem.Name = "l1TouchInvStripMenuItem";
resources.ApplyResources(this.l1TouchInvStripMenuItem, "l1TouchInvStripMenuItem");
this.l1TouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// l2TouchInvStripMenuItem
//
this.l2TouchInvStripMenuItem.CheckOnClick = true;
this.l2TouchInvStripMenuItem.Name = "l2TouchInvStripMenuItem";
resources.ApplyResources(this.l2TouchInvStripMenuItem, "l2TouchInvStripMenuItem");
this.l2TouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// r1TouchInvStripMenuItem
//
this.r1TouchInvStripMenuItem.CheckOnClick = true;
this.r1TouchInvStripMenuItem.Name = "r1TouchInvStripMenuItem";
resources.ApplyResources(this.r1TouchInvStripMenuItem, "r1TouchInvStripMenuItem");
this.r1TouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// r2TouchInvStripMenuItem
//
this.r2TouchInvStripMenuItem.CheckOnClick = true;
this.r2TouchInvStripMenuItem.Name = "r2TouchInvStripMenuItem";
resources.ApplyResources(this.r2TouchInvStripMenuItem, "r2TouchInvStripMenuItem");
this.r2TouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// upTouchInvStripMenuItem
//
this.upTouchInvStripMenuItem.CheckOnClick = true;
this.upTouchInvStripMenuItem.Name = "upTouchInvStripMenuItem";
resources.ApplyResources(this.upTouchInvStripMenuItem, "upTouchInvStripMenuItem");
this.upTouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// downTouchInvStripMenuItem
//
this.downTouchInvStripMenuItem.CheckOnClick = true;
this.downTouchInvStripMenuItem.Name = "downTouchInvStripMenuItem";
resources.ApplyResources(this.downTouchInvStripMenuItem, "downTouchInvStripMenuItem");
this.downTouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// leftTouchInvStripMenuItem
//
this.leftTouchInvStripMenuItem.CheckOnClick = true;
this.leftTouchInvStripMenuItem.Name = "leftTouchInvStripMenuItem";
resources.ApplyResources(this.leftTouchInvStripMenuItem, "leftTouchInvStripMenuItem");
this.leftTouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// rightTouchInvStripMenuItem
//
this.rightTouchInvStripMenuItem.CheckOnClick = true;
this.rightTouchInvStripMenuItem.Name = "rightTouchInvStripMenuItem";
resources.ApplyResources(this.rightTouchInvStripMenuItem, "rightTouchInvStripMenuItem");
this.rightTouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// l3TouchInvStripMenuItem
//
this.l3TouchInvStripMenuItem.CheckOnClick = true;
this.l3TouchInvStripMenuItem.Name = "l3TouchInvStripMenuItem";
resources.ApplyResources(this.l3TouchInvStripMenuItem, "l3TouchInvStripMenuItem");
this.l3TouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// r3TouchInvStripMenuItem
//
this.r3TouchInvStripMenuItem.CheckOnClick = true;
this.r3TouchInvStripMenuItem.Name = "r3TouchInvStripMenuItem";
resources.ApplyResources(this.r3TouchInvStripMenuItem, "r3TouchInvStripMenuItem");
this.r3TouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// oneFingerTouchInvStripMenuItem
//
this.oneFingerTouchInvStripMenuItem.CheckOnClick = true;
this.oneFingerTouchInvStripMenuItem.Name = "oneFingerTouchInvStripMenuItem";
resources.ApplyResources(this.oneFingerTouchInvStripMenuItem, "oneFingerTouchInvStripMenuItem");
this.oneFingerTouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// twoFingerTouchInvStripMenuItem
//
this.twoFingerTouchInvStripMenuItem.CheckOnClick = true;
this.twoFingerTouchInvStripMenuItem.Name = "twoFingerTouchInvStripMenuItem";
resources.ApplyResources(this.twoFingerTouchInvStripMenuItem, "twoFingerTouchInvStripMenuItem");
this.twoFingerTouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// optionsTouchInvStripMenuItem
//
this.optionsTouchInvStripMenuItem.CheckOnClick = true;
this.optionsTouchInvStripMenuItem.Name = "optionsTouchInvStripMenuItem";
resources.ApplyResources(this.optionsTouchInvStripMenuItem, "optionsTouchInvStripMenuItem");
this.optionsTouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// shareTouchInvStripMenuItem
//
this.shareTouchInvStripMenuItem.CheckOnClick = true;
this.shareTouchInvStripMenuItem.Name = "shareTouchInvStripMenuItem";
resources.ApplyResources(this.shareTouchInvStripMenuItem, "shareTouchInvStripMenuItem");
this.shareTouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// psTouchInvStripMenuItem
//
this.psTouchInvStripMenuItem.CheckOnClick = true;
this.psTouchInvStripMenuItem.Name = "psTouchInvStripMenuItem";
resources.ApplyResources(this.psTouchInvStripMenuItem, "psTouchInvStripMenuItem");
this.psTouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged);
//
// Options
//
resources.ApplyResources(this, "$this");
@ -3996,6 +4192,7 @@
((System.ComponentModel.ISupportInitialize)(this.nUDSXS)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nUDSZS)).EndInit();
this.cMGyroTriggers.ResumeLayout(false);
this.cMTouchDisableInvert.ResumeLayout(false);
this.ResumeLayout(false);
}
@ -4336,5 +4533,27 @@
private System.Windows.Forms.ComboBox cBSixaxisXOutputCurve;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.ContextMenuStrip cMTouchDisableInvert;
private System.Windows.Forms.ToolStripMenuItem crossTouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem circleTouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem squareTouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem triangleTouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem l1TouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem l2TouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem r1TouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem r2TouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem upTouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem downTouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem leftTouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem rightTouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem l3TouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem r3TouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem oneFingerTouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem twoFingerTouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem optionsTouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem shareTouchInvStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem psTouchInvStripMenuItem;
private System.Windows.Forms.Button touchpadDisInvertButton;
private System.Windows.Forms.Label label25;
}
}

View File

@ -614,6 +614,16 @@ namespace DS4Windows
nUDRSCurve.Value = RSCurve[device];
cBControllerInput.Checked = DS4Mapping;
for (int i = 0, arlen = cMGyroTriggers.Items.Count; i < arlen; i++)
{
((ToolStripMenuItem)cMGyroTriggers.Items[i]).Checked = false;
}
for (int i = 0, arlen = cMTouchDisableInvert.Items.Count; i < arlen; i++)
{
((ToolStripMenuItem)cMTouchDisableInvert.Items[i]).Checked = false;
}
string[] satriggers = SATriggers[device].Split(',');
List<string> s = new List<string>();
int gyroTriggerCount = cMGyroTriggers.Items.Count;
@ -641,6 +651,26 @@ namespace DS4Windows
break;
}
}
btnGyroTriggers.Text = string.Join(", ", s);
s.Clear();
int[] touchDisInvTriggers = TouchDisInvertTriggers[device];
int touchDisableInvCount = cMTouchDisableInvert.Items.Count;
for (int i = 0, trigLen = touchDisInvTriggers.Length; i < trigLen; i++)
{
int tr = touchDisInvTriggers[i];
if (tr < touchDisableInvCount && tr > -1)
{
ToolStripMenuItem current = (ToolStripMenuItem)cMTouchDisableInvert.Items[tr];
current.Checked = true;
s.Add(current.Text);
}
}
if (s.Count > 0)
touchpadDisInvertButton.Text = string.Join(", ", s);
nUDGyroSensitivity.Value = GyroSensitivity[device];
gyroTriggerBehavior.Checked = GyroTriggerTurns[device];
nUDGyroMouseVertScale.Value = GyroSensVerticalScale[device];
@ -744,7 +774,18 @@ namespace DS4Windows
nUDLSCurve.Value = 0;
nUDRSCurve.Value = 0;
cBControllerInput.Checked = DS4Mapping;
for (int i = 0, arlen = cMGyroTriggers.Items.Count - 1; i < arlen; i++)
{
((ToolStripMenuItem)cMGyroTriggers.Items[i]).Checked = false;
}
((ToolStripMenuItem)cMGyroTriggers.Items[cMGyroTriggers.Items.Count - 1]).Checked = true;
for (int i = 0, arlen = cMTouchDisableInvert.Items.Count; i < arlen; i++)
{
((ToolStripMenuItem)cMTouchDisableInvert.Items[i]).Checked = false;
}
nUDGyroSensitivity.Value = 100;
nUDGyroMouseVertScale.Value = 100;
gyroTriggerBehavior.Checked = true;
@ -1022,42 +1063,38 @@ namespace DS4Windows
if (Form.ActiveForm == root && cBControllerInput.Checked && tCControls.SelectedIndex < 1)
{
int tempDeviceNum = (int)nUDSixaxis.Value - 1;
switch (Program.rootHub.GetInputkeys(tempDeviceNum))
switch (Program.rootHub.GetActiveInputControl(tempDeviceNum))
{
case ("nothing"): break;
case ("Cross"): Show_ControlsBn(bnCross, e); break;
case ("Circle"): Show_ControlsBn(bnCircle, e); break;
case ("Square"): Show_ControlsBn(bnSquare, e); break;
case ("Triangle"): Show_ControlsBn(bnTriangle, e); break;
case ("Options"): Show_ControlsBn(bnOptions, e); break;
case ("Share"): Show_ControlsBn(bnShare, e); break;
case ("Up"): Show_ControlsBn(bnUp, e); break;
case ("Down"): Show_ControlsBn(bnDown, e); break;
case ("Left"): Show_ControlsBn(bnLeft, e); break;
case ("Right"): Show_ControlsBn(bnRight, e); break;
case ("PS"): Show_ControlsBn(bnPS, e); break;
case ("L1"): Show_ControlsBn(bnL1, e); break;
case ("R1"): Show_ControlsBn(bnR1, e); break;
case ("L2"): Show_ControlsBn(bnL2, e); break;
case ("R2"): Show_ControlsBn(bnR2, e); break;
case ("L3"): Show_ControlsBn(bnL3, e); break;
case ("R3"): Show_ControlsBn(bnR3, e); break;
case ("Touch Left"): Show_ControlsBn(bnTouchLeft, e); break;
case ("Touch Right"): Show_ControlsBn(bnTouchRight, e); break;
case ("Touch Multi"): Show_ControlsBn(bnTouchMulti, e); break;
case ("Touch Upper"): Show_ControlsBn(bnTouchUpper, e); break;
case ("LS Up"): Show_ControlsBn(bnLSUp, e); break;
case ("LS Down"): Show_ControlsBn(bnLSDown, e); break;
case ("LS Left"): Show_ControlsBn(bnLSLeft, e); break;
case ("LS Right"): Show_ControlsBn(bnLSRight, e); break;
case ("RS Up"): Show_ControlsBn(bnRSUp, e); break;
case ("RS Down"): Show_ControlsBn(bnRSDown, e); break;
case ("RS Left"): Show_ControlsBn(bnRSLeft, e); break;
case ("RS Right"): Show_ControlsBn(bnRSRight, e); break;
case ("GyroXP"): Show_ControlsBn(bnGyroXP, e); break;
case ("GyroXN"): Show_ControlsBn(bnGyroXN, e); break;
case ("GyroZP"): Show_ControlsBn(bnGyroZP, e); break;
case ("GyroZN"): Show_ControlsBn(bnGyroZN, e); break;
case DS4Controls.None: break;
case DS4Controls.Cross: Show_ControlsBn(bnCross, e); break;
case DS4Controls.Circle: Show_ControlsBn(bnCircle, e); break;
case DS4Controls.Square: Show_ControlsBn(bnSquare, e); break;
case DS4Controls.Triangle: Show_ControlsBn(bnTriangle, e); break;
case DS4Controls.Options: Show_ControlsBn(bnOptions, e); break;
case DS4Controls.Share: Show_ControlsBn(bnShare, e); break;
case DS4Controls.DpadUp: Show_ControlsBn(bnUp, e); break;
case DS4Controls.DpadDown: Show_ControlsBn(bnDown, e); break;
case DS4Controls.DpadLeft: Show_ControlsBn(bnLeft, e); break;
case DS4Controls.DpadRight: Show_ControlsBn(bnRight, e); break;
case DS4Controls.PS: Show_ControlsBn(bnPS, e); break;
case DS4Controls.L1: Show_ControlsBn(bnL1, e); break;
case DS4Controls.R1: Show_ControlsBn(bnR1, e); break;
case DS4Controls.L2: Show_ControlsBn(bnL2, e); break;
case DS4Controls.R2: Show_ControlsBn(bnR2, e); break;
case DS4Controls.L3: Show_ControlsBn(bnL3, e); break;
case DS4Controls.R3: Show_ControlsBn(bnR3, e); break;
case DS4Controls.TouchLeft: Show_ControlsBn(bnTouchLeft, e); break;
case DS4Controls.TouchRight: Show_ControlsBn(bnTouchRight, e); break;
case DS4Controls.TouchMulti: Show_ControlsBn(bnTouchMulti, e); break;
case DS4Controls.TouchUpper: Show_ControlsBn(bnTouchUpper, e); break;
case DS4Controls.LYNeg: Show_ControlsBn(bnLSUp, e); break;
case DS4Controls.LYPos: Show_ControlsBn(bnLSDown, e); break;
case DS4Controls.LXNeg: Show_ControlsBn(bnLSLeft, e); break;
case DS4Controls.LXPos: Show_ControlsBn(bnLSRight, e); break;
case DS4Controls.RYNeg: Show_ControlsBn(bnRSUp, e); break;
case DS4Controls.RYPos: Show_ControlsBn(bnRSDown, e); break;
case DS4Controls.RXNeg: Show_ControlsBn(bnRSLeft, e); break;
case DS4Controls.RXPos: Show_ControlsBn(bnRSRight, e); break;
default: break;
}
}
@ -1116,57 +1153,6 @@ namespace DS4Windows
{
lBControls.SelectedIndex = tempIndex;
}
/*switch (name)
{
#region
case "bnCross": lBControls.SelectedIndex = 0; break;
case "bnCircle": lBControls.SelectedIndex = 1; break;
case "bnSquare": lBControls.SelectedIndex = 2; break;
case "bnTriangle": lBControls.SelectedIndex = 3; break;
case "bnOptions": lBControls.SelectedIndex = 4; break;
case "bnShare": lBControls.SelectedIndex = 5; break;
case "bnUp": lBControls.SelectedIndex = 6; break;
case "bnDown": lBControls.SelectedIndex = 7; break;
case "bnLeft": lBControls.SelectedIndex = 8; break;
case "bnRight": lBControls.SelectedIndex = 9; break;
case "bnPS": lBControls.SelectedIndex = 10; break;
case "bnL1": lBControls.SelectedIndex = 11; break;
case "bnR1": lBControls.SelectedIndex = 12; break;
case "bnL2": lBControls.SelectedIndex = 13; break;
case "bnR2": lBControls.SelectedIndex = 14; break;
case "bnL3": lBControls.SelectedIndex = 15; break;
case "bnR3": lBControls.SelectedIndex = 16; break;
case "bnTouchLeft": lBControls.SelectedIndex = 17; break;
case "bnTouchRight": lBControls.SelectedIndex = 18; break;
case "bnTouchMulti": lBControls.SelectedIndex = 19; break;
case "bnTouchUpper": lBControls.SelectedIndex = 20; break;
case "bnLSUp": lBControls.SelectedIndex = 21; break;
case "bnLSDown": lBControls.SelectedIndex = 22; break;
case "bnLSLeft": lBControls.SelectedIndex = 23; break;
case "bnLSRight": lBControls.SelectedIndex = 24; break;
case "bnRSUp": lBControls.SelectedIndex = 25; break;
case "bnRSDown": lBControls.SelectedIndex = 26; break;
case "bnRSLeft": lBControls.SelectedIndex = 27; break;
case "bnRSRight": lBControls.SelectedIndex = 28; break;
case "bnGyroZN": lBControls.SelectedIndex = 29; break;
case "bnGyroZP": lBControls.SelectedIndex = 30; break;
case "bnGyroXP": lBControls.SelectedIndex = 31; break;
case "bnGyroXN": lBControls.SelectedIndex = 32; break;
#endregion
}
if (swipesOn)
{
switch (name)
{
case "bnSwipeUp": if (swipesOn) lBControls.SelectedIndex = 33; break;
case "bnSwipeDown": if (swipesOn) lBControls.SelectedIndex = 34; break;
case "bnSwipeLeft": if (swipesOn) lBControls.SelectedIndex = 35; break;
case "bnSwipeRight": if (swipesOn) lBControls.SelectedIndex = 36; break;
}
}
*/
}
DS4ControlSettings dcs = getDS4CSetting(device, name);
@ -1196,129 +1182,6 @@ namespace DS4Windows
pBHoveredButton.Location = tempLabel.Location;
}
/*switch (name)
{
#region
case "bnCross":
pBHoveredButton.Image = Properties.Resources.DS4_Config_Cross;
pBHoveredButton.Location = lbLCross.Location;
break;
case "bnCircle":
pBHoveredButton.Image = Properties.Resources.DS4_Config_Circle;
pBHoveredButton.Location = lbLCircle.Location;
break;
case "bnSquare":
pBHoveredButton.Image = Properties.Resources.DS4_Config_Square;
pBHoveredButton.Location = lbLSquare.Location;
break;
case "bnTriangle":
pBHoveredButton.Image = Properties.Resources.DS4_Config_Triangle;
pBHoveredButton.Location = lbLTriangle.Location;
break;
case "bnOptions":
pBHoveredButton.Image = Properties.Resources.DS4_Config_Options;
pBHoveredButton.Location = lbLOptions.Location;
break;
case "bnShare":
pBHoveredButton.Image = Properties.Resources.DS4_Config_Share;
pBHoveredButton.Location = lbLShare.Location;
break;
case "bnUp":
pBHoveredButton.Image = Properties.Resources.DS4_Config_Up;
pBHoveredButton.Location = lbLUp.Location;
break;
case "bnDown":
pBHoveredButton.Image = Properties.Resources.DS4_Config_Down;
pBHoveredButton.Location = lbLDown.Location;
break;
case "bnLeft":
pBHoveredButton.Image = Properties.Resources.DS4_Config_Left;
pBHoveredButton.Location = lbLLeft.Location;
break;
case "bnRight":
pBHoveredButton.Image = Properties.Resources.DS4_Config_Right;
pBHoveredButton.Location = lbLright.Location;
break;
case "bnPS":
pBHoveredButton.Image = Properties.Resources.DS4_Config_PS;
pBHoveredButton.Location = lbLPS.Location;
break;
case "bnL1":
pBHoveredButton.Image = Properties.Resources.DS4_Config_L1;
pBHoveredButton.Location = lbLL1.Location;
break;
case "bnR1":
pBHoveredButton.Image = Properties.Resources.DS4_Config_R1;
pBHoveredButton.Location = lbLR1.Location;
break;
case "bnL2":
pBHoveredButton.Image = Properties.Resources.DS4_Config_L2;
pBHoveredButton.Location = lbLL2.Location;
break;
case "bnR2":
pBHoveredButton.Image = Properties.Resources.DS4_Config_R2;
pBHoveredButton.Location = lbLR2.Location;
break;
case "bnTouchLeft":
pBHoveredButton.Image = Properties.Resources.DS4_Config_TouchLeft;
pBHoveredButton.Location = lbLTouchLM.Location;
break;
case "bnTouchRight":
pBHoveredButton.Image = Properties.Resources.DS4_Config_TouchRight;
pBHoveredButton.Location = lbLTouchRight.Location;
break;
case "bnTouchMulti":
pBHoveredButton.Image = Properties.Resources.DS4_Config_TouchMulti;
pBHoveredButton.Location = lbLTouchLM.Location;
break;
case "bnTouchUpper":
pBHoveredButton.Image = Properties.Resources.DS4_Config_TouchUpper;
pBHoveredButton.Location = lbLTouchUpper.Location;
break;
case "bnL3":
pBHoveredButton.Image = Properties.Resources.DS4_Config_LS;
pBHoveredButton.Location = lbLLS.Location;
break;
case "bnLSUp":
pBHoveredButton.Image = Properties.Resources.DS4_Config_LS;
pBHoveredButton.Location = lbLLS.Location;
break;
case "bnLSDown":
pBHoveredButton.Image = Properties.Resources.DS4_Config_LS;
pBHoveredButton.Location = lbLLS.Location;
break;
case "bnLSLeft":
pBHoveredButton.Image = Properties.Resources.DS4_Config_LS;
pBHoveredButton.Location = lbLLS.Location;
break;
case "bnLSRight":
pBHoveredButton.Image = Properties.Resources.DS4_Config_LS;
pBHoveredButton.Location = lbLLS.Location;
break;
case "bnR3":
pBHoveredButton.Image = Properties.Resources.DS4_Config_RS;
pBHoveredButton.Location = lbLRS.Location;
break;
case "bnRSUp":
pBHoveredButton.Image = Properties.Resources.DS4_Config_RS;
pBHoveredButton.Location = lbLRS.Location;
break;
case "bnRSDown":
pBHoveredButton.Image = Properties.Resources.DS4_Config_RS;
pBHoveredButton.Location = lbLRS.Location;
break;
case "bnRSLeft":
pBHoveredButton.Image = Properties.Resources.DS4_Config_RS;
pBHoveredButton.Location = lbLRS.Location;
break;
case "bnRSRight":
pBHoveredButton.Image = Properties.Resources.DS4_Config_RS;
pBHoveredButton.Location = lbLRS.Location;
break;
#endregion
}
*/
if (pBHoveredButton.Image != null)
pBHoveredButton.Size = new Size((int)(pBHoveredButton.Image.Size.Width * (dpix / 1.25f)), (int)(pBHoveredButton.Image.Size.Height * (dpix / 1.25f)));
}
@ -1445,6 +1308,18 @@ namespace DS4Windows
SATriggers[device] = string.Join(",", ints);
ints.Clear();
for (int i = 0, trigLen = cMTouchDisableInvert.Items.Count; i < trigLen; i++)
{
if (((ToolStripMenuItem)cMTouchDisableInvert.Items[i]).Checked)
ints.Add(i);
}
if (ints.Count == 0)
ints.Add(-1);
TouchDisInvertTriggers[device] = ints.ToArray();
if (nUDRainbow.Value == 0) btnRainbow.Image = greyscale;
else btnRainbow.Image = colored;
}
@ -1484,36 +1359,6 @@ namespace DS4Windows
}
}
/*public void Toggle_Bn(bool SC, bool TG, bool MC, bool MR)
{
if (lastSelected.Tag is KeyValuePair<int, string> || lastSelected.Tag is KeyValuePair<UInt16, string> || lastSelected.Tag is KeyValuePair<int[], string>)
lastSelected.Font = new Font(lastSelected.Font,
(SC ? FontStyle.Bold : FontStyle.Regular) | (TG ? FontStyle.Italic : FontStyle.Regular) |
(MC ? FontStyle.Underline : FontStyle.Regular) | (MR ? FontStyle.Strikeout : FontStyle.Regular));
else if (lastSelected.Tag is KeyValuePair<string, string>)
if (lastSelected.Tag.ToString().Contains("Mouse Button"))
lastSelected.Font = new Font(lastSelected.Font, TG ? FontStyle.Italic : FontStyle.Regular);
else
lastSelected.Font = new Font(lastSelected.Font, FontStyle.Regular);
}
public void Toggle_Bn(bool SC, bool TG, bool MC, bool MR, System.Windows.Forms.Control ctrl)
{
if (ctrl is Button)
{
Button btn = (Button)ctrl;
if (btn.Tag is KeyValuePair<int, string> || btn.Tag is KeyValuePair<UInt16, string> || btn.Tag is KeyValuePair<int[], string>)
btn.Font = new Font(btn.Font,
(SC ? FontStyle.Bold : FontStyle.Regular) | (TG ? FontStyle.Italic : FontStyle.Regular) |
(MC ? FontStyle.Underline : FontStyle.Regular) | (MR ? FontStyle.Strikeout : FontStyle.Regular));
else if (btn.Tag is KeyValuePair<string, string>)
if (btn.Tag.ToString().Contains("Mouse Button"))
btn.Font = new Font(btn.Font, TG ? FontStyle.Italic : FontStyle.Regular);
else
btn.Font = new Font(btn.Font, FontStyle.Regular);
}
}*/
private void btnLightbar_Click(object sender, EventArgs e)
{
advColorDialog.Color = Color.FromArgb(tBRedBar.Value, tBGreenBar.Value, tBBlueBar.Value);
@ -1759,7 +1604,7 @@ namespace DS4Windows
if (olddinputcheck != cBDinput.Checked)
{
root.btnStartStop_Clicked(false);
root.btnStartStop_Clicked(false);
finishDInputChange();
}
if (btnRumbleHeavyTest.Text == Properties.Resources.StopText)
@ -1835,6 +1680,7 @@ namespace DS4Windows
public void UpdateLists()
{
lBControls.BeginUpdate();
lBControls.Items[0] = "Cross : " + UpdateButtonList(bnCross);
lBControls.Items[1] = "Circle : " + UpdateButtonList(bnCircle);
lBControls.Items[2] = "Square : " + UpdateButtonList(bnSquare);
@ -1881,6 +1727,8 @@ namespace DS4Windows
lbSwipeRight.Text = UpdateButtonList(bnSwipeRight);
}
lBControls.EndUpdate();
lbGyroXN.Text = UpdateButtonList(bnGyroXN);
lbGyroZN.Text = UpdateButtonList(bnGyroZN);
lbGyroZP.Text = UpdateButtonList(bnGyroZP);
@ -2280,10 +2128,23 @@ namespace DS4Windows
if (!loading && device < 4)
{
root.btnStartStop_Clicked(false);
root.btnStartStop_Clicked(false);
finishDInputChange();
}
}
private async void finishDInputChange()
{
await System.Threading.Tasks.Task.Factory.StartNew(() =>
{
while (root.ChangingService)
{
System.Threading.Thread.Sleep(10);
}
});
root.btnStartStop_Clicked(false);
}
private void cbStartTouchpadOff_CheckedChanged(object sender, EventArgs e)
{
StartTouchpadOff[device] = cbStartTouchpadOff.Checked;
@ -2370,10 +2231,12 @@ namespace DS4Windows
}
else if (rBTPMouse.Checked && lBControls.Items.Count > 33)
{
lBControls.BeginUpdate();
lBControls.Items.RemoveAt(36);
lBControls.Items.RemoveAt(35);
lBControls.Items.RemoveAt(34);
lBControls.Items.RemoveAt(33);
lBControls.EndUpdate();
}
}
@ -2451,14 +2314,6 @@ namespace DS4Windows
MouseToolStripMenuItem.Visible = !(name == "lbTPSwipes" || name.StartsWith("bnSwipe"));
}
/*private void BatchToggle_Bn(bool scancode, Button button1, Button button2, Button button3, Button button4)
{
Toggle_Bn(scancode, false, false, false, button1);
Toggle_Bn(scancode, false, false, false, button2);
Toggle_Bn(scancode, false, false, false, button3);
Toggle_Bn(scancode, false, false, false, button4);
}*/
private void SetPreset(object sender, EventArgs e)
{
bool scancode = false;
@ -2728,37 +2583,45 @@ namespace DS4Windows
private void btnGyroTriggers_Click(object sender, EventArgs e)
{
cMGyroTriggers.Show((Control)sender, new Point(0, ((Control)sender).Height));
Control button = (Control)sender;
cMGyroTriggers.Show(button, new Point(0, button.Height));
}
private void SATrigger_CheckedChanged(object sender, EventArgs e)
{
if (sender != cMGyroTriggers.Items[cMGyroTriggers.Items.Count - 1] && ((ToolStripMenuItem)sender).Checked)
((ToolStripMenuItem)cMGyroTriggers.Items[cMGyroTriggers.Items.Count - 1]).Checked = false;
if (((ToolStripMenuItem)cMGyroTriggers.Items[cMGyroTriggers.Items.Count - 1]).Checked) //always on
for (int i = 0; i < cMGyroTriggers.Items.Count - 1; i++)
((ToolStripMenuItem)cMGyroTriggers.Items[i]).Checked = false;
List <int> ints = new List<int>();
List<string> s = new List<string>();
for (int i = 0; i < cMGyroTriggers.Items.Count - 1; i++)
if (loading == false)
{
if (((ToolStripMenuItem)cMGyroTriggers.Items[i]).Checked)
int gyroTriggerCount = cMGyroTriggers.Items.Count;
if (sender != cMGyroTriggers.Items[gyroTriggerCount - 1] && ((ToolStripMenuItem)sender).Checked)
((ToolStripMenuItem)cMGyroTriggers.Items[gyroTriggerCount - 1]).Checked = false;
if (((ToolStripMenuItem)cMGyroTriggers.Items[gyroTriggerCount - 1]).Checked) //always on
{
ints.Add(i);
s.Add(cMGyroTriggers.Items[i].Text);
for (int i = 0; i < gyroTriggerCount - 1; i++)
((ToolStripMenuItem)cMGyroTriggers.Items[i]).Checked = false;
}
}
if (ints.Count == 0)
{
ints.Add(-1);
s.Add(cMGyroTriggers.Items[cMGyroTriggers.Items.Count - 1].Text);
}
List<int> ints = new List<int>();
List<string> s = new List<string>();
for (int i = 0; i < gyroTriggerCount - 1; i++)
{
if (((ToolStripMenuItem)cMGyroTriggers.Items[i]).Checked)
{
ints.Add(i);
s.Add(cMGyroTriggers.Items[i].Text);
}
}
SATriggers[device] = string.Join(",", ints);
if (s.Count > 0)
btnGyroTriggers.Text = string.Join(", ", s);
if (ints.Count == 0)
{
ints.Add(-1);
s.Add(cMGyroTriggers.Items[gyroTriggerCount - 1].Text);
}
SATriggers[device] = string.Join(",", ints);
if (s.Count > 0)
btnGyroTriggers.Text = string.Join(", ", s);
}
}
private void cBGyroInvert_CheckChanged(object sender, EventArgs e)
@ -3042,6 +2905,42 @@ namespace DS4Windows
}
}
private void TouchDisableInvert_CheckedChanged(object sender, EventArgs e)
{
if (loading == false)
{
int touchDisableInvCount = cMTouchDisableInvert.Items.Count;
List<int> ints = new List<int>();
List<string> s = new List<string>();
for (int i = 0; i < touchDisableInvCount; i++)
{
ToolStripMenuItem current = (ToolStripMenuItem)cMTouchDisableInvert.Items[i];
if (current.Checked)
{
ints.Add(i);
s.Add(current.Text);
}
}
if (ints.Count == 0)
{
ints.Add(-1);
s.Add("None");
}
TouchDisInvertTriggers[device] = ints.ToArray();
if (s.Count > 0)
touchpadDisInvertButton.Text = string.Join(", ", s);
}
}
private void touchpadDisInvertButton_Click(object sender, EventArgs e)
{
Control button = (Control)sender;
cMTouchDisableInvert.Show(button, new Point(0, button.Height));
}
private void Options_Resize(object sender, EventArgs e)
{
fLPSettings.AutoScroll = false;
@ -3054,7 +2953,6 @@ namespace DS4Windows
if (lBControls.SelectedItem != null)
{
//lbControlName.Text = lBControls.SelectedItem.ToString();
if (controlSelectedIndex == 0)
lbControlName.ForeColor = Color.FromArgb(153, 205, 204);
else if (controlSelectedIndex == 1)

View File

@ -185,7 +185,7 @@
<value>158, 21</value>
</data>
<data name="cBTouchpadJitterCompensation.Text" xml:space="preserve">
<value>Compensación Jitter</value>
<value>Compensación de nervios</value>
</data>
<data name="lbIdleMinutes.Location" type="System.Drawing.Point, System.Drawing">
<value>257, 56</value>
@ -386,7 +386,7 @@
<value>202, 21</value>
</data>
<data name="cBLaunchProgram.Text" xml:space="preserve">
<value>Lanzar Programa con perfil</value>
<value>Abrir Programa con el perfil</value>
</data>
<data name="btnBrowse.Text" xml:space="preserve">
<value>Explorar...</value>
@ -395,7 +395,7 @@
<value>129, 17</value>
</data>
<data name="lbUseController.Text" xml:space="preserve">
<value>Utilizar Controlador</value>
<value>Utilizar Control</value>
</data>
<data name="cBMouseAccel.Location" type="System.Drawing.Point, System.Drawing">
<value>227, 11</value>
@ -413,7 +413,7 @@
<value>164, 21</value>
</data>
<data name="cBControllerInput.Text" xml:space="preserve">
<value>para Mapeo y lectura</value>
<value>para asignación y lectura</value>
</data>
<data name="cBIdleDisconnect.Size" type="System.Drawing.Size, System.Drawing">
<value>173, 21</value>
@ -461,7 +461,7 @@
<value>Barra de luz</value>
</data>
<data name="btnRumbleLightTest.Text" xml:space="preserve">
<value>Prueba Ligera</value>
<value>Prueba Rapida</value>
</data>
<data name="gBRumble.Text" xml:space="preserve">
<value>Vibración</value>
@ -497,7 +497,7 @@
<value>212, 156</value>
</data>
<data name="tPController.Text" xml:space="preserve">
<value>Lecturas del Controlador</value>
<value>Lecturas del Control</value>
</data>
<data name="cBShiftControl.Items" xml:space="preserve">
<value>(nada)/Shift desactivado</value>
@ -512,7 +512,7 @@
<value>164, 17</value>
</data>
<data name="lbtoUse.Text" xml:space="preserve">
<value>para usar estos contoles</value>
<value>para usar estos controles</value>
</data>
<data name="tPShiftMod.Text" xml:space="preserve">
<value>Modificador de Shift</value>
@ -563,10 +563,10 @@
<value>Dpad</value>
</data>
<data name="fingerOnTouchpadToolStripMenuItem.Text" xml:space="preserve">
<value>Un dedo en el Touchpad</value>
<value>Un dedo en el panel táctil</value>
</data>
<data name="fingersOnTouchpadToolStripMenuItem.Text" xml:space="preserve">
<value>Dos dedos en el Touchpad</value>
<value>Dos dedos en el panel táctil</value>
</data>
<data name="gBSensitivity,Text" xml:space="preserve">
<value>Sensibilidad</value>

View File

@ -430,7 +430,7 @@
<value>pnlTPMouse</value>
</data>
<data name="&gt;&gt;cBDoubleTap.ZOrder" xml:space="preserve">
<value>3</value>
<value>5</value>
</data>
<data name="cBTap.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -463,7 +463,7 @@
<value>pnlTPMouse</value>
</data>
<data name="&gt;&gt;cBTap.ZOrder" xml:space="preserve">
<value>8</value>
<value>10</value>
</data>
<data name="nUDTap.Location" type="System.Drawing.Point, System.Drawing">
<value>63, 39</value>
@ -484,7 +484,7 @@
<value>pnlTPMouse</value>
</data>
<data name="&gt;&gt;nUDTap.ZOrder" xml:space="preserve">
<value>6</value>
<value>8</value>
</data>
<data name="cBScroll.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -517,7 +517,7 @@
<value>pnlTPMouse</value>
</data>
<data name="&gt;&gt;cBScroll.ZOrder" xml:space="preserve">
<value>4</value>
<value>6</value>
</data>
<data name="cBSlide.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -550,7 +550,7 @@
<value>pnlTPMouse</value>
</data>
<data name="&gt;&gt;cBSlide.ZOrder" xml:space="preserve">
<value>9</value>
<value>11</value>
</data>
<data name="nUDScroll.Location" type="System.Drawing.Point, System.Drawing">
<value>167, 9</value>
@ -571,7 +571,7 @@
<value>pnlTPMouse</value>
</data>
<data name="&gt;&gt;nUDScroll.ZOrder" xml:space="preserve">
<value>2</value>
<value>4</value>
</data>
<data name="nUDTouch.Location" type="System.Drawing.Point, System.Drawing">
<value>63, 9</value>
@ -592,7 +592,7 @@
<value>pnlTPMouse</value>
</data>
<data name="&gt;&gt;nUDTouch.ZOrder" xml:space="preserve">
<value>10</value>
<value>12</value>
</data>
<data name="lbButtonMouseSens.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -658,7 +658,7 @@
<value>pnlTPMouse</value>
</data>
<data name="&gt;&gt;cBlowerRCOn.ZOrder" xml:space="preserve">
<value>7</value>
<value>9</value>
</data>
<data name="cBTouchpadJitterCompensation.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -691,7 +691,7 @@
<value>pnlTPMouse</value>
</data>
<data name="&gt;&gt;cBTouchpadJitterCompensation.ZOrder" xml:space="preserve">
<value>5</value>
<value>7</value>
</data>
<data name="lbL2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1335,6 +1335,63 @@
<data name="&gt;&gt;nUDL2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="touchpadDisInvertButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="touchpadDisInvertButton.Location" type="System.Drawing.Point, System.Drawing">
<value>162, 103</value>
</data>
<data name="touchpadDisInvertButton.Size" type="System.Drawing.Size, System.Drawing">
<value>101, 23</value>
</data>
<data name="touchpadDisInvertButton.TabIndex" type="System.Int32, mscorlib">
<value>237</value>
</data>
<data name="touchpadDisInvertButton.Text" xml:space="preserve">
<value>None</value>
</data>
<data name="&gt;&gt;touchpadDisInvertButton.Name" xml:space="preserve">
<value>touchpadDisInvertButton</value>
</data>
<data name="&gt;&gt;touchpadDisInvertButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;touchpadDisInvertButton.Parent" xml:space="preserve">
<value>pnlTPMouse</value>
</data>
<data name="&gt;&gt;touchpadDisInvertButton.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label25.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label25.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label25.Location" type="System.Drawing.Point, System.Drawing">
<value>141, 87</value>
</data>
<data name="label25.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 13</value>
</data>
<data name="label25.TabIndex" type="System.Int32, mscorlib">
<value>236</value>
</data>
<data name="label25.Text" xml:space="preserve">
<value>Disable Invert:</value>
</data>
<data name="&gt;&gt;label25.Name" xml:space="preserve">
<value>label25</value>
</data>
<data name="&gt;&gt;label25.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label25.Parent" xml:space="preserve">
<value>pnlTPMouse</value>
</data>
<data name="&gt;&gt;label25.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="label15.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@ -1363,7 +1420,7 @@
<value>pnlTPMouse</value>
</data>
<data name="&gt;&gt;label15.ZOrder" xml:space="preserve">
<value>0</value>
<value>2</value>
</data>
<data name="touchpadInvertComboBox.Items" xml:space="preserve">
<value>None</value>
@ -1378,10 +1435,10 @@
<value>Both X and Y Axes</value>
</data>
<data name="touchpadInvertComboBox.Location" type="System.Drawing.Point, System.Drawing">
<value>144, 82</value>
<value>178, 62</value>
</data>
<data name="touchpadInvertComboBox.Size" type="System.Drawing.Size, System.Drawing">
<value>121, 21</value>
<value>85, 21</value>
</data>
<data name="touchpadInvertComboBox.TabIndex" type="System.Int32, mscorlib">
<value>234</value>
@ -1396,7 +1453,7 @@
<value>pnlTPMouse</value>
</data>
<data name="&gt;&gt;touchpadInvertComboBox.ZOrder" xml:space="preserve">
<value>1</value>
<value>3</value>
</data>
<data name="cbStartTouchpadOff.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1426,7 +1483,7 @@
<value>pnlTPMouse</value>
</data>
<data name="&gt;&gt;cbStartTouchpadOff.ZOrder" xml:space="preserve">
<value>11</value>
<value>13</value>
</data>
<data name="pnlTPMouse.Location" type="System.Drawing.Point, System.Drawing">
<value>-3, 39</value>
@ -6080,7 +6137,7 @@ with profile</value>
<value>$this</value>
</data>
<data name="&gt;&gt;tCControls.ZOrder" xml:space="preserve">
<value>3</value>
<value>4</value>
</data>
<data name="tPDeadzone.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
@ -8498,7 +8555,7 @@ with profile</value>
<value>$this</value>
</data>
<data name="&gt;&gt;fLPSettings.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</value>
</data>
<metadata name="cMGyroTriggers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>482, 17</value>
@ -8632,12 +8689,141 @@ with profile</value>
<data name="&gt;&gt;cMGyroTriggers.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<metadata name="cMTouchDisableInvert.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>144, 63</value>
</metadata>
<data name="crossTouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="crossTouchInvStripMenuItem.Text" xml:space="preserve">
<value>Cross</value>
</data>
<data name="circleTouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="circleTouchInvStripMenuItem.Text" xml:space="preserve">
<value>Circle</value>
</data>
<data name="squareTouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="squareTouchInvStripMenuItem.Text" xml:space="preserve">
<value>Square</value>
</data>
<data name="triangleTouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="triangleTouchInvStripMenuItem.Text" xml:space="preserve">
<value>Triangle</value>
</data>
<data name="l1TouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="l1TouchInvStripMenuItem.Text" xml:space="preserve">
<value>L1</value>
</data>
<data name="l2TouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="l2TouchInvStripMenuItem.Text" xml:space="preserve">
<value>L2</value>
</data>
<data name="r1TouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="r1TouchInvStripMenuItem.Text" xml:space="preserve">
<value>R1</value>
</data>
<data name="r2TouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="r2TouchInvStripMenuItem.Text" xml:space="preserve">
<value>R2</value>
</data>
<data name="upTouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="upTouchInvStripMenuItem.Text" xml:space="preserve">
<value>Up</value>
</data>
<data name="downTouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="downTouchInvStripMenuItem.Text" xml:space="preserve">
<value>Down</value>
</data>
<data name="leftTouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="leftTouchInvStripMenuItem.Text" xml:space="preserve">
<value>Left</value>
</data>
<data name="rightTouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="rightTouchInvStripMenuItem.Text" xml:space="preserve">
<value>Right</value>
</data>
<data name="l3TouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="l3TouchInvStripMenuItem.Text" xml:space="preserve">
<value>L3</value>
</data>
<data name="r3TouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="r3TouchInvStripMenuItem.Text" xml:space="preserve">
<value>R3</value>
</data>
<data name="oneFingerTouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="oneFingerTouchInvStripMenuItem.Text" xml:space="preserve">
<value>Finger on Touchpad</value>
</data>
<data name="twoFingerTouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="twoFingerTouchInvStripMenuItem.Text" xml:space="preserve">
<value>2 Fingers on Touchpad</value>
</data>
<data name="optionsTouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="optionsTouchInvStripMenuItem.Text" xml:space="preserve">
<value>Options</value>
</data>
<data name="shareTouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="shareTouchInvStripMenuItem.Text" xml:space="preserve">
<value>Share</value>
</data>
<data name="psTouchInvStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 22</value>
</data>
<data name="psTouchInvStripMenuItem.Text" xml:space="preserve">
<value>PS</value>
</data>
<data name="cMTouchDisableInvert.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 422</value>
</data>
<data name="&gt;&gt;cMTouchDisableInvert.Name" xml:space="preserve">
<value>cMTouchDisableInvert</value>
</data>
<data name="&gt;&gt;cMTouchDisableInvert.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<metadata name="advColorDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>647, 17</value>
</metadata>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>176</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>96, 96</value>
</data>
@ -8947,11 +9133,125 @@ with profile</value>
<data name="&gt;&gt;alwaysOnToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;crossTouchInvStripMenuItem.Name" xml:space="preserve">
<value>crossTouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;crossTouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;circleTouchInvStripMenuItem.Name" xml:space="preserve">
<value>circleTouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;circleTouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;squareTouchInvStripMenuItem.Name" xml:space="preserve">
<value>squareTouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;squareTouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;triangleTouchInvStripMenuItem.Name" xml:space="preserve">
<value>triangleTouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;triangleTouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;l1TouchInvStripMenuItem.Name" xml:space="preserve">
<value>l1TouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;l1TouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;l2TouchInvStripMenuItem.Name" xml:space="preserve">
<value>l2TouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;l2TouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;r1TouchInvStripMenuItem.Name" xml:space="preserve">
<value>r1TouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;r1TouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;r2TouchInvStripMenuItem.Name" xml:space="preserve">
<value>r2TouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;r2TouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;upTouchInvStripMenuItem.Name" xml:space="preserve">
<value>upTouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;upTouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;downTouchInvStripMenuItem.Name" xml:space="preserve">
<value>downTouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;downTouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;leftTouchInvStripMenuItem.Name" xml:space="preserve">
<value>leftTouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;leftTouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rightTouchInvStripMenuItem.Name" xml:space="preserve">
<value>rightTouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;rightTouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;l3TouchInvStripMenuItem.Name" xml:space="preserve">
<value>l3TouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;l3TouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;r3TouchInvStripMenuItem.Name" xml:space="preserve">
<value>r3TouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;r3TouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;oneFingerTouchInvStripMenuItem.Name" xml:space="preserve">
<value>oneFingerTouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;oneFingerTouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;twoFingerTouchInvStripMenuItem.Name" xml:space="preserve">
<value>twoFingerTouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;twoFingerTouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;optionsTouchInvStripMenuItem.Name" xml:space="preserve">
<value>optionsTouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;optionsTouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;shareTouchInvStripMenuItem.Name" xml:space="preserve">
<value>shareTouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;shareTouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;psTouchInvStripMenuItem.Name" xml:space="preserve">
<value>psTouchInvStripMenuItem</value>
</data>
<data name="&gt;&gt;psTouchInvStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;advColorDialog.Name" xml:space="preserve">
<value>advColorDialog</value>
</data>
<data name="&gt;&gt;advColorDialog.Type" xml:space="preserve">
<value>DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.4.85.0, Culture=neutral, PublicKeyToken=null</value>
<value>DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.4.87.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>Options</value>

View File

@ -127,7 +127,7 @@
<value>No elimines los otros ajustes aún</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Para aquellos que prefieren un programa portable Nota: esta opción no funciona si esta en una carpeta admin son o sin UAC</value>
<value>Para aquellos que prefieren un programa portable. Nota: esta opción no funciona si esta en una carpeta admin con o sin UAC</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Para aquellos que prefieren una instalación de ajustes regular se guarda en %appdata%/ds4tool</value>

View File

@ -139,7 +139,7 @@
<value>Grabar una macro</value>
</data>
<data name="cBActions.Items2" xml:space="preserve">
<value>Lanzar un programa</value>
<value>Abrir un programa</value>
</data>
<data name="cBActions.Items3" xml:space="preserve">
<value>Cargar un perfil</value>
@ -151,37 +151,37 @@
<value>Comprobar batería</value>
</data>
<data name="cbLightbarBatt.Text" xml:space="preserve">
<value>a través del barra de luz</value>
<value>Por medio de la barra de luz</value>
</data>
<data name="cBMacroScanCode.Text" xml:space="preserve">
<value>Escanear del código</value>
</data>
<data name="cBNotificationBatt.Text" xml:space="preserve">
<value>via notificación</value>
<value>Por medio de notificación</value>
</data>
<data name="cBPressRelease.Items" xml:space="preserve">
<value>Oprimiendo trigger unload</value>
<value>Presionar gatillo de descarga</value>
</data>
<data name="cBPressRelease.Items1" xml:space="preserve">
<value>Soltando el trigger unload</value>
<value>Soltar gatillo de descarga</value>
</data>
<data name="cHTrigger.Text" xml:space="preserve">
<value>Gatillo</value>
</data>
<data name="cHUnloadTrigger.Text" xml:space="preserve">
<value>Liberar Gatillo</value>
<value>Soltar Gatillo</value>
</data>
<data name="lbArg.Text" xml:space="preserve">
<value>Argumentos</value>
</data>
<data name="lbDTapDVR.Text" xml:space="preserve">
<value>Oprimir el gatillo doblemente</value>
<value>Presionar el gatillo doblemente</value>
</data>
<data name="lbHoldDVR.Text" xml:space="preserve">
<value>Dejar oprimido el gatillo</value>
<value>Dejar presionado el gatillo</value>
</data>
<data name="lbHoldFor.Text" xml:space="preserve">
<value>Dejar oprimido por</value>
<value>Dejar presionado por</value>
</data>
<data name="lbName.Text" xml:space="preserve">
<value>Nombre</value>
@ -190,9 +190,9 @@
<value>segundos</value>
</data>
<data name="lbTapDVR.Text" xml:space="preserve">
<value>Oprimir el gatillo</value>
<value>Presionar el gatillo</value>
</data>
<data name="lbUnloadTipKey.Text" xml:space="preserve">
<value>Desligar tecla por</value>
<value>Desactivar tecla por</value>
</data>
</root>

View File

@ -121,20 +121,20 @@
<value>Paso 1: Instalar el Driver DS4</value>
</data>
<data name="button2.Text" xml:space="preserve">
<value>Paso 2: Si usas Windows 7 o inferior, instala el Driver 360</value>
<value>Paso 2: Si usas Windows 7 o inferior, instala el Driver de Xbox 360</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="linkBluetoothSettings.Size" type="System.Drawing.Size, System.Drawing">
<value>135, 13</value>
</data>
<data name="linkBluetoothSettings.Text" xml:space="preserve">
<value>Configuracion de Bluetooth</value>
<value>Configuración del Bluetooth</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Si esta ventana reaparece despues de instalar, necesitas reiniciar tu PC o esperar 10-15 minutos a que Windows reconozca el driver</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Si usas un Controlador X360 en esta PC, puedes omitir esto</value>
<value>Si usas un Controlador de Xbox 360 en esta PC, puedes omitir esto</value>
</data>
<data name="bnFinish.Text" xml:space="preserve">
<value>Finalizado</value>
@ -143,12 +143,12 @@
<value>Bienvenido a DS4Windows</value>
</data>
<data name="labelBluetooth.Text" xml:space="preserve">
<value>Para configurar el bluetooth (opcional): Mantenga presionado el botón PS y Share durante 3 segundos. La luz del controlador comenzará a parpadear.</value>
<value>Para configurar el bluetooth (opcional): Mantenga presionado el botón PS y Share durante 3 segundos. La luz del control comenzará a parpadear.</value>
</data>
<data name="labelUSB.Text" xml:space="preserve">
<value>Paso 3: Para conectar el control DS4 por medio de cable usb sólo debe conectar el cable microusb en el DS4 y el usb común en la PC.</value>
<value>Paso 3: Para conectar el control DS4 por medio de un cable USB sólo debe conectar el cable micro USB en el DS4 y el USB común en la PC.</value>
</data>
<data name="labelBluetooth2.Text" xml:space="preserve">
<value>Una vez que esté parpadeando, vaya a Configuración de Bluetooth y conéctese al "Wireless Controller". Si le pide un código de emparejamiento, utilice el "0000". Una vez emparejado, el controlador estará listo. ¡A divertirse!</value>
<value>Una vez que esté parpadeando, vaya a Configuración del Bluetooth y conéctese al "Wireless Controller". Si le pide un código de emparejamiento, utilice el "0000". Una vez emparejado, el control estará listo. ¡A divertirse!</value>
</data>
</root>

View File

@ -1,20 +1,12 @@
using Microsoft.Win32;
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Net;
using System.Text.RegularExpressions;
using System.Xml;
using System.Runtime.InteropServices;
//using Ookii.Dialogs;
namespace DS4Windows
{
@ -43,8 +35,10 @@ namespace DS4Windows
cbs[i].Items.Add(Properties.Resources.noneProfile);
cbs[i].SelectedIndex = cbs[i].Items.Count - 1;
}
if (!File.Exists(Global.appdatapath + @"\Auto Profiles.xml"))
Create();
LoadP();
if (Directory.Exists(@"C:\Program Files (x86)\Steam\steamapps\common"))
@ -64,7 +58,7 @@ namespace DS4Windows
public bool Create()
{
Boolean Saved = true;
bool Saved = true;
try
{
@ -101,10 +95,13 @@ namespace DS4Windows
programpaths.Clear();
if (!File.Exists(Global.appdatapath + "\\Auto Profiles.xml"))
return;
doc.Load(Global.appdatapath + "\\Auto Profiles.xml");
XmlNodeList programslist = doc.SelectNodes("Programs/Program");
foreach (XmlNode x in programslist)
programpaths.Add(x.Attributes["path"].Value);
lVPrograms.BeginUpdate();
foreach (string st in programpaths)
{
if (File.Exists(st))
@ -125,15 +122,9 @@ namespace DS4Windows
RemoveP(st, false, false);
}
}
lVPrograms.EndUpdate();
}
private void bnLoadSteam_Click(object sender, EventArgs e)
{
}
private void GetApps(string path)
{
lodsf.Clear();
@ -147,6 +138,7 @@ namespace DS4Windows
}
catch { }
}
appsloaded = true;
}
@ -162,8 +154,10 @@ namespace DS4Windows
}
catch { }
}
return lods;
}
private void GetShortcuts(string path)
{
lodsf.Clear();
@ -171,22 +165,32 @@ namespace DS4Windows
lodsf.AddRange(Directory.GetFiles(@"C:\ProgramData\Microsoft\Windows\Start Menu\Programs", "*.lnk", SearchOption.AllDirectories));
for (int i = 0; i < lodsf.Count; i++)
lodsf[i] = GetTargetPath(lodsf[i]);
appsloaded = true;
}
void appstimer_Tick(object sender, EventArgs e)
void addLoadedApps()
{
if (appsloaded)
{
bnAddPrograms.Text = Properties.Resources.AddingToList;
for (int i = lodsf.Count - 1; i >= 0; i--)
{
if (lodsf[i].Contains("etup") || lodsf[i].Contains("dotnet") || lodsf[i].Contains("SETUP")
|| lodsf[i].Contains("edist") || lodsf[i].Contains("nstall") || String.IsNullOrEmpty(lodsf[i]))
lodsf.RemoveAt(i);
}
for (int i = lodsf.Count - 1; i >= 0; i--)
{
for (int j = programpaths.Count - 1; j >= 0; j--)
{
if (lodsf[i].ToLower().Replace('/', '\\') == programpaths[j].ToLower().Replace('/', '\\'))
lodsf.RemoveAt(i);
}
}
lVPrograms.BeginUpdate();
foreach (string st in lodsf)
{
if (File.Exists(st))
@ -199,14 +203,14 @@ namespace DS4Windows
lVPrograms.Items.Add(lvi);
}
}
lVPrograms.EndUpdate();
bnAddPrograms.Text = Properties.Resources.AddPrograms;
bnAddPrograms.Enabled = true;
appsloaded = false;
((Timer)sender).Stop();
}
}
public void Save(string name)
{
m_Xdoc.Load(m_Profile);
@ -226,16 +230,20 @@ namespace DS4Windows
el.AppendChild(m_Xdoc.CreateElement("Controller3")).InnerText = cBProfile3.Text;
el.AppendChild(m_Xdoc.CreateElement("Controller4")).InnerText = cBProfile4.Text;
el.AppendChild(m_Xdoc.CreateElement("TurnOff")).InnerText = cBTurnOffDS4W.Checked.ToString();
try
{
XmlNode oldxmlprocess = m_Xdoc.SelectSingleNode("/Programs/Program[@path=\"" + lBProgramPath.Text + "\"]");
Node.ReplaceChild(el, oldxmlprocess);
}
catch { Node.AppendChild(el); }
m_Xdoc.AppendChild(Node);
m_Xdoc.Save(m_Profile);
if (lVPrograms.SelectedItems.Count > 0)
lVPrograms.SelectedItems[0].Checked = true;
form.LoadP();
}
@ -251,7 +259,9 @@ namespace DS4Windows
{
Item = doc.SelectSingleNode("/Programs/Program[@path=\"" + name + "\"]" + "/Controller" + (i + 1));
if (Item != null)
{
for (int j = 0; j < cbs[i].Items.Count; j++)
{
if (cbs[i].Items[j].ToString() == Item.InnerText)
{
cbs[i].SelectedIndex = j;
@ -260,9 +270,12 @@ namespace DS4Windows
}
else
cbs[i].SelectedIndex = cbs[i].Items.Count - 1;
}
}
else
cbs[i].SelectedIndex = cbs[i].Items.Count - 1;
}
Item = doc.SelectSingleNode("/Programs/Program[@path=\"" + name + "\"]" + "/TurnOff");
bool turnOff;
if (Item != null && bool.TryParse(Item.InnerText, out turnOff))
@ -276,6 +289,7 @@ namespace DS4Windows
{
for (int i = 0; i < 4; i++)
cbs[i].SelectedIndex = cbs[i].Items.Count - 1;
cBTurnOffDS4W.Checked = false;
bnSave.Enabled = false;
}
@ -283,22 +297,24 @@ namespace DS4Windows
public void RemoveP(string name, bool uncheck, bool reload = true)
{
XmlDocument doc = new XmlDocument();
doc.Load(m_Profile);
XmlNode Node = doc.SelectSingleNode("Programs");
XmlNode Item = doc.SelectSingleNode("/Programs/Program[@path=\"" + name + "\"]");
if (Item != null)
Node.RemoveChild(Item);
doc.AppendChild(Node);
doc.Save(m_Profile);
if (lVPrograms.SelectedItems.Count > 0 && uncheck)
lVPrograms.SelectedItems[0].Checked = false;
for (int i = 0; i < 4; i++)
cbs[i].SelectedIndex = cbs[i].Items.Count - 1;
bnSave.Enabled = false;
if (reload)
form.LoadP();
form.LoadP();
}
private void CBProfile_IndexChanged(object sender, EventArgs e)
@ -306,6 +322,7 @@ namespace DS4Windows
int last = cbs[0].Items.Count - 1;
if (lBProgramPath.Text != string.Empty)
bnSave.Enabled = true;
if (cbs[0].SelectedIndex == last && cbs[1].SelectedIndex == last &&
cbs[2].SelectedIndex == last && cbs[3].SelectedIndex == last && !cBTurnOffDS4W.Checked)
bnSave.Enabled = false;
@ -315,6 +332,7 @@ namespace DS4Windows
{
if (lBProgramPath.Text != "")
Save(lBProgramPath.Text);
bnSave.Enabled = false;
}
@ -328,8 +346,10 @@ namespace DS4Windows
if (lBProgramPath.Text != "")
LoadP(lBProgramPath.Text);
else
{
for (int i = 0; i < 4; i++)
cbs[i].SelectedIndex = cbs[i].Items.Count - 1;
}
}
private void bnDelete_Click(object sender, EventArgs e)
@ -359,41 +379,24 @@ namespace DS4Windows
form.RefreshAutoProfilesPage();
}
private void addSteamGamesToolStripMenuItem_Click(object sender, EventArgs e)
private async void addSteamGamesToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
var AppCollectionThread = new System.Threading.Thread(() => GetApps(steamgamesdir));
AppCollectionThread.IsBackground = true;
AppCollectionThread.Start();
}
catch { }
bnAddPrograms.Text = Properties.Resources.Loading;
bnAddPrograms.Enabled = false;
cMSPrograms.Items.Remove(addSteamGamesToolStripMenuItem);
Timer appstimer = new Timer();
appstimer.Start();
appstimer.Tick += appstimer_Tick;
await System.Threading.Tasks.Task.Run(() => GetApps(steamgamesdir));
addLoadedApps();
}
private void addDirectoryToolStripMenuItem_Click(object sender, EventArgs e)
private async void addDirectoryToolStripMenuItem_Click(object sender, EventArgs e)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
if (fbd.ShowDialog() == DialogResult.OK)
{
try
{
var AppCollectionThread = new System.Threading.Thread(() => GetApps(fbd.SelectedPath));
AppCollectionThread.IsBackground = true;
AppCollectionThread.Start();
}
catch { }
bnAddPrograms.Text = Properties.Resources.Loading;
bnAddPrograms.Enabled = false;
Timer appstimer = new Timer();
appstimer.Start();
appstimer.Tick += appstimer_Tick;
await System.Threading.Tasks.Task.Run(() => GetApps(fbd.SelectedPath));
addLoadedApps();
}
}
@ -406,6 +409,7 @@ namespace DS4Windows
{
file = GetTargetPath(file);
}
lBProgramPath.Text = file;
iLIcons.Images.Add(Icon.ExtractAssociatedIcon(file));
ListViewItem lvi = new ListViewItem(Path.GetFileNameWithoutExtension(file), lVPrograms.Items.Count);
@ -414,39 +418,22 @@ namespace DS4Windows
}
}
private void addOriginGamesToolStripMenuItem_Click(object sender, EventArgs e)
private async void addOriginGamesToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
var AppCollectionThread = new System.Threading.Thread(() => GetApps(origingamesdir));
AppCollectionThread.IsBackground = true;
AppCollectionThread.Start();
}
catch { }
bnAddPrograms.Text = Properties.Resources.Loading;
bnAddPrograms.Enabled = false;
cMSPrograms.Items.Remove(addOriginGamesToolStripMenuItem);
Timer appstimer = new Timer();
appstimer.Start();
appstimer.Tick += appstimer_Tick;
await System.Threading.Tasks.Task.Run(() => GetApps(origingamesdir));
addLoadedApps();
}
private void addProgramsFromStartMenuToolStripMenuItem_Click(object sender, EventArgs e)
private async void addProgramsFromStartMenuToolStripMenuItem_Click(object sender, EventArgs e)
{
//MessageBox.Show(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu) + "\\Programs");
try
{
var AppCollectionThread = new System.Threading.Thread(() => GetShortcuts(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu) + "\\Programs"));
AppCollectionThread.IsBackground = true;
AppCollectionThread.Start();
}
catch { }
bnAddPrograms.Text = Properties.Resources.Loading;
bnAddPrograms.Enabled = false;
cMSPrograms.Items.Remove(addProgramsFromStartMenuToolStripMenuItem);
Timer appstimer = new Timer();
appstimer.Start();
appstimer.Tick += appstimer_Tick;
await System.Threading.Tasks.Task.Run(() => GetShortcuts(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu) + "\\Programs"));
addLoadedApps();
}
public static string GetTargetPath(string filePath)
@ -545,6 +532,7 @@ namespace DS4Windows
}
}
}
class NativeMethods2
{
[DllImport("msi.dll", CharSet = CharSet.Auto)]

View File

@ -128,25 +128,25 @@
<value>70, 13</value>
</data>
<data name="lBController1.Text" xml:space="preserve">
<value>Controlador 1</value>
<value>Control 1</value>
</data>
<data name="lBController2.Size" type="System.Drawing.Size, System.Drawing">
<value>70, 13</value>
</data>
<data name="lBController2.Text" xml:space="preserve">
<value>Controlador 2</value>
<value>Control 2</value>
</data>
<data name="lBController3.Size" type="System.Drawing.Size, System.Drawing">
<value>70, 13</value>
</data>
<data name="lBController3.Text" xml:space="preserve">
<value>Controlador 3</value>
<value>Control 3</value>
</data>
<data name="lBController4.Size" type="System.Drawing.Size, System.Drawing">
<value>70, 13</value>
</data>
<data name="lBController4.Text" xml:space="preserve">
<value>Controlador 4</value>
<value>Control 4</value>
</data>
<data name="bnDelete.Text" xml:space="preserve">
<value>Quitar</value>

View File

@ -56,6 +56,18 @@ namespace DS4Windows.DS4Library
Marshal.ThrowExceptionForHR(audioDevice.Activate(ref IID_IAudioEndpointVolume, ClsCtx.ALL, IntPtr.Zero, out interfacePointer));
endpointVolume = interfacePointer as IAudioEndpointVolume;
}
else if (deviceName.Contains("Headset Earphone (Wireless Controller)"))
{
object interfacePointer;
Marshal.ThrowExceptionForHR(audioDevice.Activate(ref IID_IAudioEndpointVolume, ClsCtx.ALL, IntPtr.Zero, out interfacePointer));
endpointVolume = interfacePointer as IAudioEndpointVolume;
}
else if (deviceName.Contains("Headset Microphone (Wireless Controller)"))
{
object interfacePointer;
Marshal.ThrowExceptionForHR(audioDevice.Activate(ref IID_IAudioEndpointVolume, ClsCtx.ALL, IntPtr.Zero, out interfacePointer));
endpointVolume = interfacePointer as IAudioEndpointVolume;
}
Marshal.ReleaseComObject(audioDevice);
}

View File

@ -112,18 +112,18 @@ namespace DS4Windows
public class DS4Device
{
private const int BT_OUTPUT_REPORT_LENGTH = 78;
private const int BT_INPUT_REPORT_LENGTH = 547;
internal const int BT_OUTPUT_REPORT_LENGTH = 78;
internal const int BT_INPUT_REPORT_LENGTH = 547;
// Use large value for worst case scenario
private const int READ_STREAM_TIMEOUT = 1000;
internal const int READ_STREAM_TIMEOUT = 3000;
// Isolated BT report can have latency as high as 15 ms
// due to hardware.
private const int WARN_INTERVAL_BT = 20;
private const int WARN_INTERVAL_USB = 10;
internal const int WARN_INTERVAL_BT = 20;
internal const int WARN_INTERVAL_USB = 10;
// Maximum values for battery level when no USB cable is connected
// and when a USB cable is connected
private const int BATTERY_MAX = 8;
private const int BATTERY_MAX_USB = 11;
internal const int BATTERY_MAX = 8;
internal const int BATTERY_MAX_USB = 11;
public const string blankSerial = "00:00:00:00:00:00";
private HidDevice hDevice;
private string Mac;
@ -407,7 +407,7 @@ namespace DS4Windows
private bool timeoutEvent = false;
public DS4Device(HidDevice hidDevice)
{
{
hDevice = hidDevice;
conType = HidConnectionType(hDevice);
Mac = hDevice.readSerial();
@ -419,6 +419,13 @@ namespace DS4Windows
if (conType == ConnectionType.USB)
{
warnInterval = WARN_INTERVAL_USB;
HidDeviceAttributes tempAttr = hDevice.Attributes;
if (tempAttr.VendorId == 0x054C && tempAttr.ProductId == 0x09CC)
{
audio = new DS4Audio();
micAudio = new DS4Audio(DS4Library.CoreAudio.DataFlow.Capture);
}
synced = true;
}
else
@ -441,6 +448,8 @@ namespace DS4Windows
touchpad = new DS4Touchpad();
sixAxis = new DS4SixAxis();
refreshCalibration();
}
private void timeoutTestThread()
@ -460,6 +469,14 @@ namespace DS4Windows
}
}
public void refreshCalibration()
{
byte[] calibration = new byte[41];
calibration[0] = conType == ConnectionType.BT ? (byte)0x05 : (byte)0x02;
hDevice.readFeatureData(calibration);
sixAxis.setCalibrationData(ref calibration, conType == ConnectionType.USB);
}
public void StartUpdate()
{
if (ds4Input == null)
@ -483,6 +500,8 @@ namespace DS4Windows
ds4Output.Start();
timeoutCheckThread = new Thread(timeoutTestThread);
timeoutCheckThread.Priority = ThreadPriority.BelowNormal;
timeoutCheckThread.Name = "DS4 Timeout thread: " + Mac;
timeoutCheckThread.IsBackground = true;
timeoutCheckThread.Start();
}
@ -559,53 +578,60 @@ namespace DS4Windows
}
}
private byte outputPendCount = 0;
private void performDs4Output()
{
lock (outputReport)
try
{
try
int lastError = 0;
outputPendCount = 3;
while (!exitOutputThread)
{
int lastError = 0;
while (!exitOutputThread)
{
bool result = false;
if (outputRumble)
{
result = writeOutput();
bool result = false;
if (!result)
{
int thisError = Marshal.GetLastWin32Error();
if (lastError != thisError)
{
Console.WriteLine(Mac.ToString() + " " + System.DateTime.UtcNow.ToString("o") + "> encountered write failure: " + thisError);
//Log.LogToGui(Mac.ToString() + " encountered write failure: " + thisError, true);
lastError = thisError;
}
}
else
{
outputRumble = false;
}
if (outputRumble)
{
lock (outputReportBuffer)
{
outputReportBuffer.CopyTo(outputReport, 0);
outputRumble = false;
outputPendCount--;
}
if (!outputRumble)
result = writeOutput();
if (!result)
{
lastError = 0;
Monitor.Wait(outputReport);
/*if (testRumble.IsRumbleSet()) // repeat test rumbles periodically; rumble has auto-shut-off in the DS4 firmware
Monitor.Wait(outputReport, 10000); // DS4 firmware stops it after 5 seconds, so let the motors rest for that long, too.
else
Monitor.Wait(outputReport);
*/
outputRumble = true;
int thisError = Marshal.GetLastWin32Error();
if (lastError != thisError)
{
Console.WriteLine(Mac.ToString() + " " + System.DateTime.UtcNow.ToString("o") + "> encountered write failure: " + thisError);
//Log.LogToGui(Mac.ToString() + " encountered write failure: " + thisError, true);
lastError = thisError;
}
}
}
}
catch (ThreadInterruptedException)
{
if (!outputRumble)
{
lastError = 0;
lock (outputReportBuffer)
{
Monitor.Wait(outputReportBuffer);
}
/*if (testRumble.IsRumbleSet()) // repeat test rumbles periodically; rumble has auto-shut-off in the DS4 firmware
Monitor.Wait(outputReport, 10000); // DS4 firmware stops it after 5 seconds, so let the motors rest for that long, too.
else
Monitor.Wait(outputReport);
*/
}
}
}
catch (ThreadInterruptedException)
{
}
}
/** Is the device alive and receiving valid sensor input reports? */
@ -636,7 +662,7 @@ namespace DS4Windows
public double Latency = 0.0;
public string error;
public bool firstReport = false;
public bool firstReport = true;
public bool oldCharging = false;
double curTimeDouble = 0.0;
double oldTimeDouble = 0.0;
@ -644,11 +670,15 @@ namespace DS4Windows
bool ds4InactiveFrame = true;
bool idleInput = true;
bool timeStampInit = false;
uint timeStampPrevious = 0;
uint deltaTimeCurrent = 0;
private void performDs4Input()
{
firstActive = DateTime.UtcNow;
NativeMethods.HidD_SetNumInputBuffers(hDevice.safeReadHandle.DangerousGetHandle(), 2);
Queue<long> latencyQueue = new Queue<long>(51); // Set capacity at max + 1 to avoid any resizing
Queue<long> latencyQueue = new Queue<long>(31); // Set capacity at max + 1 to avoid any resizing
int tempLatencyCount = 0;
long oldtime = 0;
string currerror = string.Empty;
@ -658,16 +688,20 @@ namespace DS4Windows
timeoutEvent = false;
ds4InactiveFrame = true;
idleInput = true;
bool syncWriteReport = true;
int maxBatteryValue = 0;
int tempBattery = 0;
uint tempStamp = 0;
double elapsedDeltaTime = 0.0;
uint tempDelta = 0;
while (!exitInputThread)
{
oldCharging = charging;
currerror = string.Empty;
if (tempLatencyCount >= 50)
if (tempLatencyCount >= 30)
{
latencyQueue.Dequeue();
tempLatencyCount--;
@ -809,21 +843,17 @@ namespace DS4Windows
cState.TouchButton = (inputReport[7] & 0x02) != 0;
cState.FrameCounter = (byte)(inputReport[7] >> 2);
try
charging = (inputReport[30] & 0x10) != 0;
maxBatteryValue = charging ? BATTERY_MAX_USB : BATTERY_MAX;
tempBattery = (inputReport[30] & 0x0f) * 100 / maxBatteryValue;
battery = Math.Min((byte)tempBattery, (byte)100);
cState.Battery = (byte)battery;
//System.Diagnostics.Debug.WriteLine("CURRENT BATTERY: " + (inputReport[30] & 0x0f) + " | " + tempBattery + " | " + battery);
if (inputReport[30] != priorInputReport30)
{
charging = (inputReport[30] & 0x10) != 0;
maxBatteryValue = charging ? BATTERY_MAX_USB : BATTERY_MAX;
tempBattery = (inputReport[30] & 0x0f) * 100 / maxBatteryValue;
battery = Math.Min((byte)tempBattery, (byte)100);
cState.Battery = (byte)battery;
//System.Diagnostics.Debug.WriteLine("CURRENT BATTERY: " + (inputReport[30] & 0x0f) + " | " + tempBattery + " | " + battery);
if (inputReport[30] != priorInputReport30)
{
priorInputReport30 = inputReport[30];
//Console.WriteLine(MacAddress.ToString() + " " + System.DateTime.UtcNow.ToString("o") + "> power subsystem octet: 0x" + inputReport[30].ToString("x02"));
}
priorInputReport30 = inputReport[30];
//Console.WriteLine(MacAddress.ToString() + " " + System.DateTime.UtcNow.ToString("o") + "> power subsystem octet: 0x" + inputReport[30].ToString("x02"));
}
catch { currerror = "Index out of bounds: battery"; }
// XXX DS4State mapping needs fixup, turn touches into an array[4] of structs. And include the touchpad details there instead.
try
@ -840,18 +870,40 @@ namespace DS4Windows
cState.Touch2Identifier = (byte)(inputReport[4 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] & 0x7f);
cState.Touch1Finger = cState.Touch1 || cState.Touch2; // >= 1 touch detected
cState.Touch2Fingers = cState.Touch1 && cState.Touch2; // 2 touches detected
cState.TouchLeft = (inputReport[1 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] + ((inputReport[2 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] & 0xF) * 255) >= 1920 * 2 / 5) ? false : true;
cState.TouchRight = (inputReport[1 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] + ((inputReport[2 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] & 0xF) * 255) < 1920 * 2 / 5) ? false : true;
int touchX = (((inputReport[2 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] & 0xF) << 8) | inputReport[1 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset]);
cState.TouchLeft = touchX >= 1920 * 2 / 5 ? false : true;
cState.TouchRight = touchX < 1920 * 2 / 5 ? false : true;
// Even when idling there is still a touch packet indicating no touch 1 or 2
touchpad.handleTouchpad(inputReport, cState, touchOffset);
}
}
catch { currerror = "Index out of bounds: touchpad"; }
tempStamp = (uint)((ushort)(inputReport[11] << 8) | inputReport[10]);
if (timeStampInit == false)
{
timeStampInit = true;
deltaTimeCurrent = tempStamp * 16u / 3u;
}
else if (timeStampPrevious > tempStamp)
{
tempDelta = ushort.MaxValue - timeStampPrevious + tempStamp + 1u;
deltaTimeCurrent = tempDelta * 16u / 3u;
}
else
{
tempDelta = tempStamp - timeStampPrevious;
deltaTimeCurrent = tempDelta * 16u / 3u;
}
cState.elapsedMicroSec = deltaTimeCurrent;
timeStampPrevious = tempStamp;
elapsedDeltaTime = 0.000001 * deltaTimeCurrent; // Convert from microseconds to seconds
// Store Gyro and Accel values
Array.Copy(inputReport, 13, gyro, 0, 6);
Array.Copy(inputReport, 19, accel, 0, 6);
sixAxis.handleSixaxis(gyro, accel, cState, lastTimeElapsedDouble);
sixAxis.handleSixaxis(gyro, accel, cState, elapsedDeltaTime);
/* Debug output of incoming HID data:
if (cState.L2 == 0xff && cState.R2 == 0xff)
@ -948,7 +1000,6 @@ namespace DS4Windows
if (Report != null)
Report(this, EventArgs.Empty);
bool syncWriteReport = true;
if (conType == ConnectionType.BT)
{
syncWriteReport = false;
@ -986,48 +1037,47 @@ namespace DS4Windows
setTestRumble();
setHapticState();
if (conType == ConnectionType.BT)
{
outputReportBuffer[0] = 0x11;
//outputReportBuffer[1] = 0x80;
//outputReportBuffer[1] = 0x84;
outputReportBuffer[1] = (byte)(0x80 | btPollRate); // input report rate
// enable rumble (0x01), lightbar (0x02), flash (0x04)
outputReportBuffer[3] = 0xf7;
outputReportBuffer[6] = rightLightFastRumble; // fast motor
outputReportBuffer[7] = leftHeavySlowRumble; // slow motor
outputReportBuffer[8] = ligtBarColor.red; // red
outputReportBuffer[9] = ligtBarColor.green; // green
outputReportBuffer[10] = ligtBarColor.blue; // blue
outputReportBuffer[11] = ledFlashOn; // flash on duration
outputReportBuffer[12] = ledFlashOff; // flash off duration
}
else
{
outputReportBuffer[0] = 0x05;
// enable rumble (0x01), lightbar (0x02), flash (0x04)
outputReportBuffer[1] = 0xf7;
outputReportBuffer[4] = rightLightFastRumble; // fast motor
outputReportBuffer[5] = leftHeavySlowRumble; // slow motor
outputReportBuffer[6] = ligtBarColor.red; // red
outputReportBuffer[7] = ligtBarColor.green; // green
outputReportBuffer[8] = ligtBarColor.blue; // blue
outputReportBuffer[9] = ledFlashOn; // flash on duration
outputReportBuffer[10] = ledFlashOff; // flash off duration
if (conType == ConnectionType.SONYWA)
{
// Headphone volume levels
outputReportBuffer[19] = outputReportBuffer[20] =
Convert.ToByte(audio.getVolume());
// Microphone volume level
outputReportBuffer[21] = Convert.ToByte(micAudio.getVolume());
}
}
bool quitOutputThread = false;
lock (outputReport)
lock (outputReportBuffer)
{
if (conType == ConnectionType.BT)
{
outputReportBuffer[0] = 0x11;
//outputReportBuffer[1] = 0x80;
//outputReportBuffer[1] = 0x84;
outputReportBuffer[1] = (byte)(0x80 | btPollRate); // input report rate
// enable rumble (0x01), lightbar (0x02), flash (0x04)
outputReportBuffer[3] = 0xf7;
outputReportBuffer[6] = rightLightFastRumble; // fast motor
outputReportBuffer[7] = leftHeavySlowRumble; // slow motor
outputReportBuffer[8] = ligtBarColor.red; // red
outputReportBuffer[9] = ligtBarColor.green; // green
outputReportBuffer[10] = ligtBarColor.blue; // blue
outputReportBuffer[11] = ledFlashOn; // flash on duration
outputReportBuffer[12] = ledFlashOff; // flash off duration
}
else
{
outputReportBuffer[0] = 0x05;
// enable rumble (0x01), lightbar (0x02), flash (0x04)
outputReportBuffer[1] = 0xf7;
outputReportBuffer[4] = rightLightFastRumble; // fast motor
outputReportBuffer[5] = leftHeavySlowRumble; // slow motor
outputReportBuffer[6] = ligtBarColor.red; // red
outputReportBuffer[7] = ligtBarColor.green; // green
outputReportBuffer[8] = ligtBarColor.blue; // blue
outputReportBuffer[9] = ledFlashOn; // flash on duration
outputReportBuffer[10] = ledFlashOff; // flash off duration
if (audio != null)
{
// Headphone volume levels
outputReportBuffer[19] = outputReportBuffer[20] =
Convert.ToByte(audio.getVolume());
// Microphone volume level
outputReportBuffer[21] = Convert.ToByte(micAudio.getVolume());
}
}
if (synchronous)
{
outputRumble = false;
@ -1049,15 +1099,19 @@ namespace DS4Windows
}
else
{
bool output = false;
bool output = outputPendCount > 0;
for (int i = 0, arlen = outputReport.Length; !output && i < arlen; i++)
output = outputReport[i] != outputReportBuffer[i];
if (output)
{
if (outputPendCount == 0)
{
outputPendCount = 3;
}
outputRumble = true;
outputReportBuffer.CopyTo(outputReport, 0);
Monitor.Pulse(outputReport);
Monitor.Pulse(outputReportBuffer);
}
}
}
@ -1206,6 +1260,16 @@ namespace DS4Windows
pState.CopyTo(state);
}
public DS4State getCurrentStateRef()
{
return cState;
}
public DS4State getPreviousStateRef()
{
return pState;
}
private bool isDS4Idle()
{
if (cState.Square || cState.Cross || cState.Circle || cState.Triangle)

View File

@ -7,13 +7,37 @@ using System.Security.Principal;
namespace DS4Windows
{
public class VidPidInfo
{
public readonly int vid;
public readonly int pid;
internal VidPidInfo(int vid, int pid)
{
this.vid = vid;
this.pid = pid;
}
}
public class DS4Devices
{
// (HID device path, DS4Device)
private static Dictionary<string, DS4Device> Devices = new Dictionary<string, DS4Device>();
private static HashSet<string> deviceSerials = new HashSet<string>();
private static HashSet<string> DevicePaths = new HashSet<string>();
// Keep instance of opened exclusive mode devices not in use (Charging while using BT connection)
private static List<HidDevice> DisabledDevices = new List<HidDevice>();
private static Stopwatch sw = new Stopwatch();
public static bool isExclusiveMode = false;
internal const int SONY_VID = 0x054C;
internal const int RAZER_VID = 0x1532;
internal const int NACON_VID = 0x146B;
private static VidPidInfo[] knownDevices =
{
new VidPidInfo(SONY_VID, 0xBA0), new VidPidInfo(SONY_VID, 0x5C4),
new VidPidInfo(SONY_VID, 0x09CC), new VidPidInfo(RAZER_VID, 0x1000),
new VidPidInfo(NACON_VID, 0x0D01)
};
private static string devicePathToInstanceId(string devicePath)
{
@ -34,9 +58,7 @@ namespace DS4Windows
{
lock (Devices)
{
int[] vid = { 0x054C, 0x146B };
int[] pid = { 0xBA0, 0x5C4, 0x09CC, 0x0D01 };
IEnumerable<HidDevice> hDevices = HidDevices.Enumerate(vid, pid);
IEnumerable<HidDevice> hDevices = HidDevices.EnumerateDS4(knownDevices);
// Sort Bluetooth first in case USB is also connected on the same controller.
hDevices = hDevices.OrderBy<HidDevice, ConnectionType>((HidDevice d) => { return DS4Device.HidConnectionType(d); });
@ -47,7 +69,7 @@ namespace DS4Windows
string devicePlural = "device" + (devCount == 0 || devCount > 1 ? "s" : "");
//Log.LogToGui("Found " + devCount + " possible " + devicePlural + ". Examining " + devicePlural + ".", false);
for (int i = 0; i < devCount; i++)
for (int i = 0; i < devCount; i++)
//foreach (HidDevice hDevice in hDevices)
{
HidDevice hDevice = tempList[i];
@ -103,7 +125,7 @@ namespace DS4Windows
{
string serial = hDevice.readSerial();
bool validSerial = !serial.Equals(DS4Device.blankSerial);
if (Devices.ContainsKey(serial))
if (validSerial && deviceSerials.Contains(serial))
{
// happens when the BT endpoint already is open and the USB is plugged into the same host
if (isExclusiveMode && hDevice.IsExclusive &&
@ -121,29 +143,14 @@ namespace DS4Windows
{
DS4Device ds4Device = new DS4Device(hDevice);
//ds4Device.Removal += On_Removal;
Devices.Add(ds4Device.MacAddress, ds4Device);
Devices.Add(hDevice.DevicePath, ds4Device);
DevicePaths.Add(hDevice.DevicePath);
deviceSerials.Add(serial);
}
}
}
}
}
//allows to get DS4Device by specifying unique MAC address
//format for MAC address is XX:XX:XX:XX:XX:XX
public static DS4Device getDS4Controller(string mac)
{
lock (Devices)
{
DS4Device device = null;
try
{
Devices.TryGetValue(mac, out device);
}
catch (ArgumentNullException) { }
return device;
}
}
// Returns DS4 controllers that were found and are running
public static IEnumerable<DS4Device> getDS4Controllers()
@ -172,6 +179,7 @@ namespace DS4Windows
Devices.Clear();
DevicePaths.Clear();
deviceSerials.Clear();
DisabledDevices.Clear();
}
}
@ -185,8 +193,9 @@ namespace DS4Windows
if (device != null)
{
device.HidDevice.CloseDevice();
Devices.Remove(device.MacAddress);
Devices.Remove(device.HidDevice.DevicePath);
DevicePaths.Remove(device.HidDevice.DevicePath);
deviceSerials.Remove(device.MacAddress);
//purgeHiddenExclusiveDevices();
}
}
@ -199,13 +208,19 @@ namespace DS4Windows
DS4Device device = (DS4Device)sender;
if (device != null)
{
string devPath = device.HidDevice.DevicePath;
string serial = device.getMacAddress();
if (Devices.ContainsKey(serial))
if (Devices.ContainsKey(devPath))
{
Devices.Remove(serial);
deviceSerials.Remove(serial);
device.updateSerial();
serial = device.getMacAddress();
Devices.Add(serial, device);
if (DS4Device.isValidSerial(serial))
{
deviceSerials.Add(serial);
}
device.refreshCalibration();
}
}
}
@ -252,7 +267,6 @@ namespace DS4Windows
public static void reEnableDevice(string deviceInstanceId)
{
Stopwatch sw = new Stopwatch();
bool success;
Guid hidGuid = new Guid();
NativeMethods.HidD_GetHidGuid(ref hidGuid);
@ -287,7 +301,8 @@ namespace DS4Windows
throw new Exception("Error disabling device, error code = " + Marshal.GetLastWin32Error());
}
sw.Start();
//System.Threading.Thread.Sleep(50);
sw.Restart();
while (sw.ElapsedMilliseconds < 50)
{
// Use SpinWait to keep control of current thread. Using Sleep could potentially

View File

@ -15,47 +15,210 @@ namespace DS4Windows
public class SixAxis
{
public const int ACC_RES_PER_G = 8192;
private const float F_ACC_RES_PER_G = ACC_RES_PER_G;
public const int GYRO_RES_IN_DEG_SEC = 16;
private const float F_GYRO_RES_IN_DEG_SEC = GYRO_RES_IN_DEG_SEC;
public int gyroYaw, gyroPitch, gyroRoll, accelX, accelY, accelZ;
public readonly int gyroYawFull, gyroPitchFull, gyroRollFull;
public int outputAccelX, outputAccelY, outputAccelZ;
public double accelXG, accelYG, accelZG;
public double angVelYaw, angVelPitch, angVelRoll;
public int gyroYawFull, gyroPitchFull, gyroRollFull;
public int accelXFull, accelYFull, accelZFull;
public readonly byte touchID;
public readonly double elapsed;
public readonly SixAxis previousAxis = null;
public SixAxis(int X, int Y, int Z, int aX, int aY, int aZ,
double milliseconds, SixAxis prevAxis = null)
public double elapsed;
public SixAxis previousAxis = null;
private double tempDouble = 0d;
public SixAxis(int X, int Y, int Z,
int aX, int aY, int aZ,
double elapsedDelta, SixAxis prevAxis = null)
{
populate(X, Y, Z, aX, aY, aZ, elapsedDelta, prevAxis);
}
public void copy(SixAxis src)
{
gyroYaw = src.gyroYaw;
gyroPitch = src.gyroPitch;
gyroRoll = src.gyroRoll;
gyroYawFull = src.gyroYawFull;
accelXFull = src.accelXFull; accelYFull = src.accelYFull; accelZFull = src.accelZFull;
angVelYaw = src.angVelYaw;
angVelPitch = src.angVelPitch;
angVelRoll = src.angVelRoll;
accelXG = src.accelXG;
accelYG = src.accelYG;
accelZG = src.accelZG;
// Put accel ranges between 0 - 128 abs
accelX = src.accelX;
accelY = src.accelY;
accelZ = src.accelZ;
outputAccelX = accelX;
outputAccelY = accelY;
outputAccelZ = accelZ;
elapsed = src.elapsed;
previousAxis = src.previousAxis;
}
public void populate(int X, int Y, int Z,
int aX, int aY, int aZ,
double elapsedDelta, SixAxis prevAxis = null)
{
gyroYaw = -X / 256;
gyroPitch = Y / 256;
gyroRoll = -Z / 256;
gyroYawFull = -X;
gyroPitchFull = Y;
gyroRollFull = -Z;
gyroYawFull = -X; gyroPitchFull = Y; gyroRollFull = -Z;
accelXFull = -aX; accelYFull = -aY; accelZFull = aZ;
angVelYaw = gyroYawFull / F_GYRO_RES_IN_DEG_SEC;
angVelPitch = gyroPitchFull / F_GYRO_RES_IN_DEG_SEC;
angVelRoll = gyroRollFull / F_GYRO_RES_IN_DEG_SEC;
accelXG = tempDouble = accelXFull / F_ACC_RES_PER_G;
accelYG = tempDouble = accelYFull / F_ACC_RES_PER_G;
accelZG = tempDouble = accelZFull / F_ACC_RES_PER_G;
// Put accel ranges between 0 - 128 abs
accelX = -aX / 64;
accelY = -aY / 64;
accelZ = aZ / 64;
outputAccelX = accelX;
outputAccelY = accelY;
outputAccelZ = accelZ;
accelXFull = -aX;
accelYFull = -aY;
accelZFull = aZ;
elapsed = milliseconds;
elapsed = elapsedDelta;
previousAxis = prevAxis;
}
}
internal class CalibData
{
public int bias;
public int sensNumer;
public int sensDenom;
public const int GyroPitchIdx = 0, GyroYawIdx = 1, GyroRollIdx = 2,
AccelXIdx = 3, AccelYIdx = 4, AccelZIdx = 5;
}
public class DS4SixAxis
{
public event EventHandler<SixAxisEventArgs> SixAccelMoved = null;
private SixAxis sPrev = null, now = null;
private CalibData[] calibrationData = new CalibData[6] { new CalibData(), new CalibData(),
new CalibData(), new CalibData(), new CalibData(), new CalibData()
};
internal int lastGyroYaw, lastGyroPitch, lastGyroRoll,
lastAX, lastAY, lastAZ;
public DS4SixAxis()
{
sPrev = new SixAxis(0, 0, 0, 0, 0, 0, 0.0);
now = new SixAxis(0, 0, 0, 0, 0, 0, 0.0);
}
internal double lastMilliseconds;
internal byte[] previousPacket = new byte[8];
int temInt = 0;
public void setCalibrationData(ref byte[] calibData, bool fromUSB)
{
int pitchPlus, pitchMinus, yawPlus, yawMinus, rollPlus, rollMinus,
accelXPlus, accelXMinus, accelYPlus, accelYMinus, accelZPlus, accelZMinus,
gyroSpeedPlus, gyroSpeedMinus;
public void handleSixaxis(byte[] gyro, byte[] accel, DS4State state, double milliseconds)
calibrationData[0].bias = (short)((ushort)(calibData[2] << 8) | calibData[1]);
calibrationData[1].bias = (short)((ushort)(calibData[4] << 8) | calibData[3]);
calibrationData[2].bias = (short)((ushort)(calibData[6] << 8) | calibData[5]);
if (!fromUSB)
{
pitchPlus = temInt = (short)((ushort)(calibData[8] << 8) | calibData[7]);
yawPlus = temInt = (short)((ushort)(calibData[10] << 8) | calibData[9]);
rollPlus = temInt = (short)((ushort)(calibData[12] << 8) | calibData[11]);
pitchMinus = temInt = (short)((ushort)(calibData[14] << 8) | calibData[13]);
yawMinus = temInt = (short)((ushort)(calibData[16] << 8) | calibData[15]);
rollMinus = temInt = (short)((ushort)(calibData[18] << 8) | calibData[17]);
}
else
{
pitchPlus = temInt = (short)((ushort)(calibData[8] << 8) | calibData[7]);
pitchMinus = temInt = (short)((ushort)(calibData[10] << 8) | calibData[9]);
yawPlus = temInt = (short)((ushort)(calibData[12] << 8) | calibData[11]);
yawMinus = temInt = (short)((ushort)(calibData[14] << 8) | calibData[13]);
rollPlus = temInt = (short)((ushort)(calibData[16] << 8) | calibData[15]);
rollMinus = temInt = (short)((ushort)(calibData[18] << 8) | calibData[17]);
}
gyroSpeedPlus = temInt = (short)((ushort)(calibData[20] << 8) | calibData[19]);
gyroSpeedMinus = temInt = (short)((ushort)(calibData[22] << 8) | calibData[21]);
accelXPlus = temInt = (short)((ushort)(calibData[24] << 8) | calibData[23]);
accelXMinus = temInt = (short)((ushort)(calibData[26] << 8) | calibData[25]);
accelYPlus = temInt = (short)((ushort)(calibData[28] << 8) | calibData[27]);
accelYMinus = temInt = (short)((ushort)(calibData[30] << 8) | calibData[29]);
accelZPlus = temInt = (short)((ushort)(calibData[32] << 8) | calibData[31]);
accelZMinus = temInt = (short)((ushort)(calibData[34] << 8) | calibData[33]);
int gyroSpeed2x = temInt = (gyroSpeedPlus + gyroSpeedMinus);
calibrationData[0].sensNumer = gyroSpeed2x* SixAxis.GYRO_RES_IN_DEG_SEC;
calibrationData[0].sensDenom = pitchPlus - pitchMinus;
calibrationData[1].sensNumer = gyroSpeed2x* SixAxis.GYRO_RES_IN_DEG_SEC;
calibrationData[1].sensDenom = yawPlus - yawMinus;
calibrationData[2].sensNumer = gyroSpeed2x* SixAxis.GYRO_RES_IN_DEG_SEC;
calibrationData[2].sensDenom = rollPlus - rollMinus;
int accelRange = temInt = accelXPlus - accelXMinus;
calibrationData[3].bias = accelXPlus - accelRange / 2;
calibrationData[3].sensNumer = 2 * SixAxis.ACC_RES_PER_G;
calibrationData[3].sensDenom = accelRange;
accelRange = temInt = accelYPlus - accelYMinus;
calibrationData[4].bias = accelYPlus - accelRange / 2;
calibrationData[4].sensNumer = 2 * SixAxis.ACC_RES_PER_G;
calibrationData[4].sensDenom = accelRange;
accelRange = temInt = accelZPlus - accelZMinus;
calibrationData[5].bias = accelZPlus - accelRange / 2;
calibrationData[5].sensNumer = 2 * SixAxis.ACC_RES_PER_G;
calibrationData[5].sensDenom = accelRange;
}
private void applyCalibs(ref int yaw, ref int pitch, ref int roll,
ref int accelX, ref int accelY, ref int accelZ)
{
CalibData current = calibrationData[0];
temInt = pitch - current.bias;
pitch = temInt = (int)(temInt * (current.sensNumer / (float)current.sensDenom));
current = calibrationData[1];
temInt = yaw - current.bias;
yaw = temInt = (int)(temInt * (current.sensNumer / (float)current.sensDenom));
current = calibrationData[2];
temInt = roll - current.bias;
roll = temInt = (int)(temInt * (current.sensNumer / (float)current.sensDenom));
current = calibrationData[3];
temInt = accelX - current.bias;
accelX = temInt = (int)(temInt * (current.sensNumer / (float)current.sensDenom));
current = calibrationData[4];
temInt = accelY - current.bias;
accelY = temInt = (int)(temInt * (current.sensNumer / (float)current.sensDenom));
current = calibrationData[5];
temInt = accelZ - current.bias;
accelZ = temInt = (int)(temInt * (current.sensNumer / (float)current.sensDenom));
}
public void handleSixaxis(byte[] gyro, byte[] accel, DS4State state,
double elapsedDelta)
{
int currentYaw = (short)((ushort)(gyro[3] << 8) | gyro[2]);
int currentPitch = (short)((ushort)(gyro[1] << 8) | gyro[0]);
@ -64,30 +227,21 @@ namespace DS4Windows
int AccelY = (short)((ushort)(accel[3] << 8) | accel[2]);
int AccelZ = (short)((ushort)(accel[5] << 8) | accel[4]);
applyCalibs(ref currentYaw, ref currentPitch, ref currentRoll, ref AccelX, ref AccelY, ref AccelZ);
SixAxisEventArgs args = null;
if (AccelX != 0 || AccelY != 0 || AccelZ != 0)
{
if (SixAccelMoved != null)
{
SixAxis sPrev = null, now = null;
sPrev = new SixAxis(lastGyroYaw, lastGyroPitch, lastGyroRoll,
lastAX, lastAY, lastAZ, lastMilliseconds);
now = new SixAxis(currentYaw, currentPitch, currentRoll,
AccelX, AccelY, AccelZ, milliseconds, sPrev);
sPrev.copy(now);
now.populate(currentYaw, currentPitch, currentRoll,
AccelX, AccelY, AccelZ, elapsedDelta, sPrev);
args = new SixAxisEventArgs(state.ReportTimeStamp, now);
state.Motion = now;
SixAccelMoved(this, args);
}
lastGyroYaw = currentYaw;
lastGyroPitch = currentPitch;
lastGyroRoll = currentRoll;
lastAX = AccelX;
lastAY = AccelY;
lastAZ = AccelZ;
lastMilliseconds = milliseconds;
}
}
}

View File

@ -23,6 +23,7 @@ namespace DS4Windows
public double LYUnit;
public double RXUnit;
public double RYUnit;
public uint elapsedMicroSec = 0;
public SixAxis Motion = null;
public static readonly int DEFAULT_AXISDIR_VALUE = 127;
@ -46,6 +47,7 @@ namespace DS4Windows
LYUnit = 0.0;
RXUnit = 0.0;
RYUnit = 0.0;
elapsedMicroSec = 0;
Motion = new SixAxis(0, 0, 0, 0, 0, 0, 0.0);
}
@ -93,6 +95,7 @@ namespace DS4Windows
LYUnit = state.LYUnit;
RXUnit = state.RXUnit;
RYUnit = state.RYUnit;
elapsedMicroSec = state.elapsedMicroSec;
Motion = state.Motion;
}
@ -145,6 +148,7 @@ namespace DS4Windows
state.LYUnit = LYUnit;
state.RXUnit = RXUnit;
state.RYUnit = RYUnit;
state.elapsedMicroSec = elapsedMicroSec;
state.Motion = Motion;
}

View File

@ -78,5 +78,23 @@ namespace DS4Windows
{
return _state.Motion.accelZ;
}
public int OutputAccelX { get { return _state.Motion.outputAccelX; } }
public int getOutputAccelX()
{
return _state.Motion.outputAccelX;
}
public int OutputAccelY { get { return _state.Motion.outputAccelY; } }
public int getOutputAccelY()
{
return _state.Motion.outputAccelY;
}
public int OutputAccelZ { get { return _state.Motion.outputAccelZ; } }
public int getOutputAccelZ()
{
return _state.Motion.outputAccelZ;
}
}
}

View File

@ -92,10 +92,10 @@ namespace DS4Windows
byte touchID1 = (byte)(data[0 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] & 0x7F);
byte touchID2 = (byte)(data[4 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] & 0x7F);
int currentX1 = data[1 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] + ((data[2 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] & 0xF) * 255);
int currentY1 = ((data[2 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] & 0xF0) >> 4) + (data[3 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] * 16);
int currentX2 = data[5 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] + ((data[6 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] & 0xF) * 255);
int currentY2 = ((data[6 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] & 0xF0) >> 4) + (data[7 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] * 16);
int currentX1 = ((data[2 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] & 0x0F) << 8) | data[1 + TOUCHPAD_DATA_OFFSET + touchPacketOffset];
int currentY1 = (data[3 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] << 4) | ((data[2 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] & 0xF0) >> 4);
int currentX2 = ((data[6 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] & 0x0F) << 8) | data[5 + TOUCHPAD_DATA_OFFSET + touchPacketOffset];
int currentY2 = (data[7 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] << 4) | ((data[6 + TOUCHPAD_DATA_OFFSET + touchPacketOffset] & 0xF0) >> 4);
TouchpadEventArgs args;
if (sensors.Touch1 || sensors.Touch2)

View File

@ -9,10 +9,25 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DS4Windows</RootNamespace>
<AssemblyName>DS4Windows</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -73,13 +88,33 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="JetBrains.Annotations, Version=10.2.1.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
<HintPath>..\packages\TaskScheduler.2.5.23\lib\net40\JetBrains.Annotations.dll</HintPath>
<Reference Include="JetBrains.Annotations, Version=10.4.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
<HintPath>..\packages\TaskScheduler.2.5.28\lib\net452\JetBrains.Annotations.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Win32.TaskScheduler, Version=2.5.23.0, Culture=neutral, PublicKeyToken=0d013ddd5178a2ae, processorArchitecture=MSIL">
<HintPath>..\packages\TaskScheduler.2.5.23\lib\net40\Microsoft.Win32.TaskScheduler.dll</HintPath>
<Reference Include="Microsoft.Win32.TaskScheduler, Version=2.5.28.0, Culture=neutral, PublicKeyToken=0d013ddd5178a2ae, processorArchitecture=MSIL">
<HintPath>..\packages\TaskScheduler.2.5.28\lib\net452\Microsoft.Win32.TaskScheduler.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@ -87,14 +122,10 @@
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Management" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
@ -1149,8 +1180,33 @@
<Content Include="Resources\xbox_360_controller.png" />
<Content Include="Resources\Y.png" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>rem Copy compiled l18n assemblies to alt folder
GOTO END
if not exist $(TargetDir)Lang mkdir $(TargetDir)Lang
set langs=ar cs de de-DE el es fi fr fr-FR he hu id it it-IT ja ko nl pl ^
pt-BR ro-RO ru-RU sl sv tr uk vi zh-CN zh-Hans zh-Hant
for %25%25l in (%25langs%25) do (
xcopy $(TargetDir)%25%25l $(TargetDir)Lang\%25%25l\ /s /y
)
:END</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

@ -42,6 +42,31 @@ namespace DS4Windows
productIds.Contains(x.Attributes.ProductId));
}
public static IEnumerable<HidDevice> EnumerateDS4(VidPidInfo[] devInfo)
{
List<HidDevice> foundDevs = new List<HidDevice>();
int devInfoLen = devInfo.Length;
IEnumerable<DeviceInfo> temp = EnumerateDevices();
for (int i = 0, len = temp.Count(); i < len; i++)
{
DeviceInfo x = temp.ElementAt(i);
HidDevice tempDev = new HidDevice(x.Path, x.Description);
bool found = false;
for (int j = 0; !found && j < devInfoLen; j++)
{
VidPidInfo tempInfo = devInfo[j];
if (tempDev.Attributes.VendorId == tempInfo.vid &&
tempDev.Attributes.ProductId == tempInfo.pid)
{
found = true;
foundDevs.Add(tempDev);
}
}
}
return foundDevs;
}
public static IEnumerable<HidDevice> Enumerate(int vendorId)
{
return EnumerateDevices().Select(x => new HidDevice(x.Path, x.Description)).Where(x => x.Attributes.VendorId == vendorId);

View File

@ -19,11 +19,11 @@ namespace DS4Windows
// whole system, including other users. But the application can not be brought
// into view, of course.
private static string SingleAppComEventName = "{a52b5b20-d9ee-4f32-8518-307fa14aa0c6}";
//static Mutex mutex = new Mutex(true, "{FI329DM2-DS4W-J2K2-HYES-92H21B3WJARG}");
private static BackgroundWorker singleAppComThread = null;
private static EventWaitHandle threadComEvent = null;
private static bool exitComThread = false;
public static ControlService rootHub;
private static Thread testThread;
private static Thread controlThread;
/// <summary>
/// The main entry point for the application.
@ -31,7 +31,7 @@ namespace DS4Windows
[STAThread]
static void Main(string[] args)
{
//Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("he");
//Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("ja");
for (int i = 0, argsLen = args.Length; i < argsLen; i++)
{
string s = args[i];
@ -96,11 +96,15 @@ namespace DS4Windows
// Create the Event handle
threadComEvent = new EventWaitHandle(false, EventResetMode.ManualReset, SingleAppComEventName);
CreateInterAppComThread();
//System.Threading.Tasks.Task.Run(() => CreateTempWorkerThread());
//CreateInterAppComThread();
CreateTempWorkerThread();
//System.Threading.Tasks.Task.Run(() => { Thread.CurrentThread.Priority = ThreadPriority.Lowest; CreateInterAppComThread(); Thread.CurrentThread.Priority = ThreadPriority.Lowest; }).Wait();
//if (mutex.WaitOne(TimeSpan.Zero, true))
//{
rootHub = new ControlService();
createControlService();
//rootHub = new ControlService();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new DS4Form(args));
@ -109,25 +113,32 @@ namespace DS4Windows
exitComThread = true;
threadComEvent.Set(); // signal the other instance.
while (singleAppComThread.IsBusy)
Thread.Sleep(50);
while (testThread.IsAlive)
Thread.SpinWait(500);
threadComEvent.Close();
}
static private void CreateInterAppComThread()
private static void createControlService()
{
singleAppComThread = new BackgroundWorker();
//singleAppComThread.WorkerReportsProgress = false;
//singleAppComThread.WorkerSupportsCancellation = true;
singleAppComThread.DoWork += new DoWorkEventHandler(singleAppComThread_DoWork);
singleAppComThread.RunWorkerAsync();
controlThread = new Thread(() => { rootHub = new ControlService(); });
controlThread.Priority = ThreadPriority.Normal;
controlThread.IsBackground = true;
controlThread.Start();
while (controlThread.IsAlive)
Thread.SpinWait(500);
}
static private void singleAppComThread_DoWork(object sender, DoWorkEventArgs e)
private static void CreateTempWorkerThread()
{
testThread = new Thread(singleAppComThread_DoWork);
testThread.Priority = ThreadPriority.Lowest;
testThread.IsBackground = true;
testThread.Start();
}
private static void singleAppComThread_DoWork()
{
BackgroundWorker worker = sender as BackgroundWorker;
WaitHandle[] waitHandles = new WaitHandle[] { threadComEvent };
Thread.CurrentThread.Priority = ThreadPriority.Lowest;
while (!exitComThread)
{
@ -141,7 +152,7 @@ namespace DS4Windows
if (!exitComThread && Application.OpenForms.Count > 0)
{
Form mainForm = Application.OpenForms[0];
mainForm.Invoke(new SetFormVisableDelegate(ThreadFormVisable), mainForm);
mainForm?.Invoke(new SetFormVisableDelegate(ThreadFormVisable), mainForm);
}
}
}

View File

@ -1,4 +1,5 @@
using System.Reflection;
using System.Resources;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@ -32,5 +33,7 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.4.86")]
[assembly: AssemblyFileVersion("1.4.86")]
[assembly: AssemblyVersion("1.4.99")]
[assembly: AssemblyFileVersion("1.4.99")]
[assembly: NeutralResourcesLanguage("en")]

View File

@ -124,10 +124,10 @@
<value>Agregar programas</value>
</data>
<data name="AlwaysRainbow" xml:space="preserve">
<value>Siempre Modo Alcoiris</value>
<value>Siempre en Modo Arcoiris</value>
</data>
<data name="AssignProfile" xml:space="preserve">
<value>Asignar a Controlador *number*</value>
<value>Asignar al Control *number*</value>
</data>
<data name="Battery" xml:space="preserve">
<value>Batería: *number*%</value>
@ -157,13 +157,13 @@
<value>Conectando...</value>
</data>
<data name="ContextEdit" xml:space="preserve">
<value>Editar perfil para el Controlador *number*</value>
<value>Editar perfil para el Control *number*</value>
</data>
<data name="ContextNew" xml:space="preserve">
<value>Crear perfil para el Controlador *number*</value>
<value>Crear perfil para el Control *number*</value>
</data>
<data name="ControllerWasRemoved" xml:space="preserve">
<value>Controlador *Mac address* perdió la conexión o fue desconectado</value>
<value>Control *Mac address* perdió la conexión o fue desconectado</value>
</data>
<data name="CopyComplete" xml:space="preserve">
<value>Copia completa, por favor reinicia DS4Windows y elimina preferencias del directorio de programa</value>
@ -184,7 +184,7 @@
<value>Borrar perfil?</value>
</data>
<data name="DinputOnly" xml:space="preserve">
<value>Apagar la entrada X360 y utilizar solo la entrada nativa DS4, ocultar ds4 debe estar apagado</value>
<value>Apagar la entrada de Xbox 360 y utilizar solo la entrada nativa DS4, ocultar DS4 debe estar apagado</value>
</data>
<data name="Disconnected" xml:space="preserve">
<value>Desconectado</value>
@ -211,7 +211,7 @@
<value>Brillar HID</value>
</data>
<data name="FoundController" xml:space="preserve">
<value>Controlador Encontrado:</value>
<value>Control Encontrado:</value>
</data>
<data name="Full" xml:space="preserve">
<value>Completo</value>
@ -283,7 +283,7 @@
<value>Carpeta de Perfil se ha movido a Carpeta de Programa</value>
</data>
<data name="QuitOtherPrograms" xml:space="preserve">
<value>Debes salir de otras aplicaciones como Steam, Uplay antes de activar la opción "Ocultar controlador DS4"</value>
<value>Debes salir de otras aplicaciones como Steam, Uplay antes de activar la opción "Ocultar control DS4"</value>
</data>
<data name="RecordText" xml:space="preserve">
<value>Grabar</value>
@ -292,7 +292,7 @@
<value>Guardar Macro grabado?</value>
</data>
<data name="SearchingController" xml:space="preserve">
<value>Buscando controladores...</value>
<value>Buscando controles...</value>
</data>
<data name="SelectActionTitle" xml:space="preserve">
<value>Selecciona una acción para *action*</value>
@ -316,10 +316,10 @@
<value>DS4Windows detenido</value>
</data>
<data name="StoppingDS4" xml:space="preserve">
<value>Deteniendo Controladores DS4</value>
<value>Deteniendo Controles DS4</value>
</data>
<data name="StoppingX360" xml:space="preserve">
<value>Deteniendo Controladores X360</value>
<value>Deteniendo Controles X360</value>
</data>
<data name="StopText" xml:space="preserve">
<value>Detener</value>
@ -349,10 +349,10 @@
<value>Inclinacion Arriba</value>
</data>
<data name="TouchpadMovementOff" xml:space="preserve">
<value>Movimiento de Panel Táctil Apagado</value>
<value>Movimiento del Panel Táctil Apagado</value>
</data>
<data name="TouchpadMovementOn" xml:space="preserve">
<value>Movimiento de Panel Táctil Encendido</value>
<value>Movimiento del Panel Táctil Encendido</value>
</data>
<data name="TypeNewName" xml:space="preserve">
<value>escriba nuevo nombre aquí</value>
@ -367,13 +367,13 @@
<value>Actualizado</value>
</data>
<data name="UseControllerForMapping" xml:space="preserve">
<value>También puedes utilizar tu controlador para cambiar controles</value>
<value>También puedes utilizar tu control para cambiar controles</value>
</data>
<data name="UsingExclusive" xml:space="preserve">
<value>Usando Modo Exclusivo</value>
</data>
<data name="UsingProfile" xml:space="preserve">
<value>Controlador *number* está usando perfil "*Profile name*"</value>
<value>Control *number* está usando el perfil "*Profile name*"</value>
</data>
<data name="UsingShared" xml:space="preserve">
<value>Usando Modo Compartido</value>
@ -403,7 +403,7 @@
<value>Cerrar DS4Windows?</value>
</data>
<data name="CloseMinimize" xml:space="preserve">
<value>Cierra DS4Windows vía el icono de notificación</value>
<value>Cierra DS4Windows por medio del icono de notificación</value>
</data>
<data name="DimByBattery" xml:space="preserve">
<value>Atenuar al % de la batería</value>
@ -451,10 +451,10 @@
<value>Utiliza Sixaxis para ayudar a calcular el movimiento del Panel Táctil</value>
</data>
<data name="LatencyNotOverTen" xml:space="preserve">
<value>Controlador *number* tiene menos de 10ms de latencia</value>
<value>El control *number* tiene menos de 10ms de latencia</value>
</data>
<data name="LatencyOverTen" xml:space="preserve">
<value>Controlador *number* tiene más de 10ms de latencia</value>
<value>El control *number* tiene más de 10ms de latencia</value>
</data>
<data name="LaunchProgram" xml:space="preserve">
<value>Abrir *program*</value>
@ -469,7 +469,7 @@
<value>Macro</value>
</data>
<data name="NotUsingProfile" xml:space="preserve">
<value>Controlador *number* no está utilizando un perfil</value>
<value>El control *number* no está utilizando un perfil</value>
</data>
<data name="OtherFileLocation" xml:space="preserve">
<value>, otros archivos de localización serán eliminados</value>
@ -520,10 +520,10 @@
<value>Inclinacion Abajo</value>
</data>
<data name="TouchpadOffTip" xml:space="preserve">
<value>Rehabilita pulsando PS+Panel Táctil</value>
<value>Rehabilita pulsando PS + Panel Táctil</value>
</data>
<data name="TwoFingerSwipe" xml:space="preserve">
<value>2 dedos en el Panel Táctil desliza derecha o izquierda</value>
<value>Dos dedos en el Panel Táctil: desliza derecha o izquierda</value>
</data>
<data name="UsingTPSwipes" xml:space="preserve">
<value>Esto desactiva el panel táctil como un ratón</value>
@ -544,6 +544,6 @@
<value>Test</value>
</data>
<data name="XinputPorts" xml:space="preserve">
<value>Utiliza puertos más altos si tienes conflictos en otros programas de emulación X360, como la herramienta SCP</value>
<value>Utiliza puertos más altos si tienes conflictos en otros programas emuladores de Xbox 360, como la herramienta SCP</value>
</data>
</root>

View File

@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="Lang"/>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="TaskScheduler" version="2.5.23" targetFramework="net45" />
<package id="TaskScheduler" version="2.5.28" targetFramework="net452" />
</packages>

View File

@ -11,7 +11,7 @@ website at [ds4windows.com](http://ds4windows.com).
## Requirements
- [Microsoft .NET 4.5 or higher (needed to unzip the driver and for macros to work properly)](http://www.microsoft.com/en-us/download/details.aspx?id=42642)
- [Microsoft .NET 4.5.2 or higher (needed to unzip the driver and for macros to work properly)](http://www.microsoft.com/en-us/download/details.aspx?id=42642)
- SCP Virtual Bus Driver (Downloaded & Installed with DS4Windows)
- Microsoft 360 Driver (link inside DS4Windows, already installed on Windows 7 SP1 and higher or if you've used a 360 controller before)
- Sony DualShock 4 (This should be obvious)

4
TODO.md Normal file
View File

@ -0,0 +1,4 @@
# TODO
~~* Check why flashing LED code consumes one CPU core~~