Skip to content
This repository has been archived by the owner on Oct 24, 2021. It is now read-only.

Commit

Permalink
Version 1.4.4
Browse files Browse the repository at this point in the history
Revised shift modifier: each button/control has their own independent
shift trigger instead of one universal one
Select an action window: this window now highlights what said control is
currently set to.
Removed unused images, making the exe a meg smaller
Completely revised how the code for custom mapping works
Updated all translations, added partial Dutch/Nederlands Support
  • Loading branch information
Jays2Kings committed Dec 18, 2015
1 parent fa639ba commit 93936cf
Show file tree
Hide file tree
Showing 98 changed files with 18,791 additions and 132,844 deletions.
12 changes: 6 additions & 6 deletions DS4Windows/DS4Control/ControlSerivce.cs
Original file line number Diff line number Diff line change
Expand Up @@ -479,13 +479,13 @@ protected virtual void On_Report(object sender, EventArgs e)
L2Sens[ind] != 0 || R2Sens[ind] != 0) //if a curve or deadzone is in place
cState = Mapping.SetCurveAndDeadzone(ind, cState);
if (!recordingMacro && (!string.IsNullOrEmpty(tempprofilename[ind]) ||
getHasCustomKeysorButtons(ind) || getHasShiftCustomKeysorButtons(ind) || ProfileActions[ind].Count > 0))
HasCustomAction(ind) || HasCustomExtras(ind) || ProfileActions[ind].Count > 0))
{
Mapping.MapCustom(ind, cState, MappedState[ind], ExposedState[ind], touchPad[ind], this);
cState = MappedState[ind];
}
if (getHasCustomExtras(ind))
DoExtras(ind);
//if (HasCustomExtras(ind))
// DoExtras(ind);

// Update the GUI/whatever.
DS4LightBar.updateLightBar(device, ind, cState, ExposedState[ind], touchPad[ind]);
Expand Down Expand Up @@ -534,7 +534,7 @@ public void LagFlashWarning(int ind, bool on)
}
}

private void DoExtras(int ind)
/* private void DoExtras(int ind)
{
DS4State cState = CurrentState[ind];
DS4StateExposed eState = ExposedState[ind];
Expand Down Expand Up @@ -589,8 +589,8 @@ private void DoExtras(int ind)
setRumble(0, 0, ind);
held[ind] = false;
}
}

}*/


public void EasterTime(int ind)
Expand Down
47 changes: 3 additions & 44 deletions DS4Windows/DS4Control/DS4LightBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@ public static void updateLightBar(DS4Device device, int deviceNum, DS4State cSta
DS4Color color;
if (!defualtLight && !forcelight[deviceNum])
{
if (ShiftColorOn[deviceNum] && ShiftModifier[deviceNum] > 0 && shiftMod(device, deviceNum, cState, eState, tp))
{
color = ShiftColor[deviceNum];
}
else if (UseCustomLed[deviceNum])
if (UseCustomLed[deviceNum])
{
if (LedAsBatteryIndicator[deviceNum])
{
Expand Down Expand Up @@ -140,9 +136,7 @@ public static void updateLightBar(DS4Device device, int deviceNum, DS4State cSta
color = HuetoRGB((float)counters[deviceNum] % 360, 255);
break;
case 3:
if (!(ShiftColorOn[deviceNum] && ShiftModifier[deviceNum] > 0 && shiftMod(device, deviceNum, cState, eState, tp)) &&
!UseCustomLed[deviceNum])
color = ChargingColor[deviceNum];
color = ChargingColor[deviceNum];
break;
default:
break;
Expand Down Expand Up @@ -214,42 +208,7 @@ public static void updateLightBar(DS4Device device, int deviceNum, DS4State cSta
}

public static bool defualtLight = false, shuttingdown = false;

public static bool shiftMod(DS4Device device, int deviceNum, DS4State cState, DS4StateExposed eState, Mouse tp)
{
bool shift;
switch (ShiftModifier[deviceNum])
{
case 1: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.Cross, cState, eState, tp); break;
case 2: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.Circle, cState, eState, tp); break;
case 3: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.Square, cState, eState, tp); break;
case 4: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.Triangle, cState, eState, tp); break;
case 5: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.Options, cState, eState, tp); break;
case 6: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.Share, cState, eState, tp); break;
case 7: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.DpadUp, cState, eState, tp); break;
case 8: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.DpadDown, cState, eState, tp); break;
case 9: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.DpadLeft, cState, eState, tp); break;
case 10: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.DpadRight, cState, eState, tp); break;
case 11: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.PS, cState, eState, tp); break;
case 12: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.L1, cState, eState, tp); break;
case 13: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.R1, cState, eState, tp); break;
case 14: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.L2, cState, eState, tp); break;
case 15: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.R2, cState, eState, tp); break;
case 16: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.L3, cState, eState, tp); break;
case 17: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.R3, cState, eState, tp); break;
case 18: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.TouchLeft, cState, eState, tp); break;
case 19: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.TouchUpper, cState, eState, tp); break;
case 20: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.TouchMulti, cState, eState, tp); break;
case 21: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.TouchRight, cState, eState, tp); break;
case 22: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.GyroZNeg, cState, eState, tp); break;
case 23: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.GyroZPos, cState, eState, tp); break;
case 24: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.GyroXPos, cState, eState, tp); break;
case 25: shift = Mapping.getBoolMapping(deviceNum, DS4Controls.GyroXNeg, cState, eState, tp); break;
case 26: shift = device.getCurrentState().Touch1; break;
default: shift = false; break;
}
return shift;
}

public static DS4Color HuetoRGB(float hue, byte sat)
{
byte C = sat;
Expand Down
Loading

0 comments on commit 93936cf

Please sign in to comment.