2014-03-28 02:50:40 +01:00
using System ;
using System.Drawing ;
using System.Windows.Forms ;
2014-04-27 21:32:09 +02:00
using System.Collections.Generic ;
using System.IO ;
2019-07-17 22:20:38 +02:00
using Microsoft.Win32 ; // We need Registry class from here
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
using static DS4Windows . Global ;
2019-04-30 21:29:50 +02:00
namespace DS4Windows.Forms
2014-03-28 02:50:40 +01:00
{
public partial class Options : Form
{
2014-05-30 22:39:39 +02:00
public int device ;
2014-06-02 19:29:38 +02:00
public string filename ;
2014-06-21 20:00:28 +02:00
public Timer inputtimer = new Timer ( ) , sixaxisTimer = new Timer ( ) ;
2015-12-18 07:25:51 +01:00
public List < Button > buttons = new List < Button > ( ) ;
2014-04-30 21:32:44 +02:00
private int alphacolor ;
2015-11-28 06:47:26 +01:00
private Color reg , full , main ;
2014-04-30 21:32:44 +02:00
private Image colored , greyscale ;
2015-11-28 06:47:26 +01:00
private Image rainbowImg = Properties . Resources . rainbow ;
2014-05-25 01:08:40 +02:00
ToolTip tp = new ToolTip ( ) ;
2014-12-13 21:12:03 +01:00
public DS4Form root ;
2014-08-23 22:52:20 +02:00
bool olddinputcheck = false ;
2014-11-14 20:44:50 +01:00
private float dpix ;
private float dpiy ;
2019-04-19 05:56:18 +02:00
public Dictionary < string , string > defaults = null ;
private Dictionary < string , string > xboxDefaults = new Dictionary < string , string > ( ) ;
private Dictionary < string , string > ds4Defaults = new Dictionary < string , string > ( ) ;
2015-11-30 22:15:17 +01:00
public bool saving , loading ;
2017-04-07 03:16:12 +02:00
public bool actionTabSeen = false ;
2015-11-30 22:15:17 +01:00
public static Size mSize { get ; private set ; }
2017-05-05 10:28:45 +02:00
private Dictionary < Control , int > hoverIndexDict = new Dictionary < Control , int > ( ) ;
private Dictionary < Control , Bitmap > hoverImageDict = new Dictionary < Control , Bitmap > ( ) ;
private Dictionary < Control , Label > hoverLabelDict = new Dictionary < Control , Label > ( ) ;
2017-07-13 05:39:46 +02:00
private int [ ] touchpadInvertToValue = new int [ 4 ] { 0 , 2 , 1 , 3 } ;
2017-11-28 16:49:28 +01:00
private Bitmap pnlControllerBgImg ;
2017-12-01 11:47:10 +01:00
private Bitmap btnLightBgImg ;
private Bitmap btnLightBg ;
2019-06-17 08:22:39 +02:00
private AdvancedColorDialog advColorDialog ;
2017-07-13 05:39:46 +02:00
int tempInt = 0 ;
2017-04-26 23:51:15 +02:00
2015-11-30 22:15:17 +01:00
public Options ( DS4Form rt )
{
InitializeComponent ( ) ;
2019-06-17 08:22:39 +02:00
advColorDialog = new AdvancedColorDialog ( ) ;
2017-11-28 16:49:28 +01:00
pnlControllerBgImg = ( Bitmap ) Properties . Resources . DS4_Config . Clone ( ) ;
2017-12-01 11:47:10 +01:00
btnLightBg = ( Bitmap ) Properties . Resources . DS4_lightbar . Clone ( ) ;
2017-11-28 16:49:28 +01:00
pnlController . BackgroundImage = null ;
pnlController . BackgroundImageLayout = ImageLayout . None ;
2015-11-30 22:15:17 +01:00
mSize = MaximumSize ;
MaximumSize = new Size ( 0 , 0 ) ;
root = rt ;
btnRumbleHeavyTest . Text = Properties . Resources . TestHText ;
btnRumbleLightTest . Text = Properties . Resources . TestLText ;
2019-08-23 05:03:03 +02:00
//rBTPControls.Text = rBSAControls.Text;
//rBTPMouse.Text = rBSAMouse.Text;
//rBTPControls.Location = rBSAControls.Location;
//rBTPMouse.Location = rBSAMouse.Location;
2015-11-30 22:15:17 +01:00
Visible = false ;
2015-12-13 22:30:54 +01:00
colored = btnRainbow . Image ;
greyscale = GreyscaleImage ( ( Bitmap ) btnRainbow . Image ) ;
2017-04-26 10:00:05 +02:00
2015-11-30 22:15:17 +01:00
foreach ( Control control in tPControls . Controls )
2017-04-26 10:00:05 +02:00
{
2015-11-30 22:15:17 +01:00
if ( control is Button & & ! ( ( Button ) control ) . Name . Contains ( "btn" ) )
buttons . Add ( ( Button ) control ) ;
2017-04-26 10:00:05 +02:00
}
2015-11-30 22:15:17 +01:00
foreach ( Control control in fLPTouchSwipe . Controls )
2017-04-26 10:00:05 +02:00
{
2015-11-30 22:15:17 +01:00
if ( control is Button & & ! ( ( Button ) control ) . Name . Contains ( "btn" ) )
buttons . Add ( ( Button ) control ) ;
2017-04-26 10:00:05 +02:00
}
2015-11-30 22:15:17 +01:00
foreach ( Control control in fLPTiltControls . Controls )
2017-04-26 10:00:05 +02:00
{
2015-11-30 22:15:17 +01:00
if ( control is Button & & ! ( ( Button ) control ) . Name . Contains ( "btn" ) )
buttons . Add ( ( Button ) control ) ;
2017-04-26 10:00:05 +02:00
}
2015-12-18 07:25:51 +01:00
foreach ( Control control in pnlController . Controls )
2017-04-26 10:00:05 +02:00
{
2015-12-18 07:25:51 +01:00
if ( control is Button & & ! ( ( Button ) control ) . Name . Contains ( "btn" ) )
buttons . Add ( ( Button ) control ) ;
2017-04-26 10:00:05 +02:00
}
2015-11-30 22:15:17 +01:00
foreach ( Button b in buttons )
2015-12-18 07:25:51 +01:00
{
2019-04-19 05:56:18 +02:00
//Console.WriteLine("{0} -> {1}", b.Name, b.Text);
xboxDefaults . Add ( b . Name , b . Text ) ;
2015-12-18 07:25:51 +01:00
b . Text = "" ;
}
2019-04-19 05:56:18 +02:00
defaults = xboxDefaults ;
PopulateDS4Defaults ( ) ;
2015-12-18 07:25:51 +01:00
2017-05-17 08:02:12 +02:00
foreach ( Control control in Controls )
2015-11-30 22:15:17 +01:00
{
if ( control . HasChildren )
2017-04-26 10:00:05 +02:00
{
2017-05-17 08:02:12 +02:00
foreach ( Control ctrl in control . Controls )
2015-11-30 22:15:17 +01:00
{
if ( ctrl . HasChildren )
2017-04-26 10:00:05 +02:00
{
2017-05-17 08:02:12 +02:00
foreach ( Control ctrl2 in ctrl . Controls )
2015-11-30 22:15:17 +01:00
{
if ( ctrl2 . HasChildren )
2017-04-26 10:00:05 +02:00
{
2017-05-17 08:02:12 +02:00
foreach ( Control ctrl3 in ctrl2 . Controls )
2015-11-30 22:15:17 +01:00
ctrl3 . MouseHover + = Items_MouseHover ;
2017-04-26 10:00:05 +02:00
}
2015-11-30 22:15:17 +01:00
ctrl2 . MouseHover + = Items_MouseHover ;
}
2017-04-26 10:00:05 +02:00
}
2015-11-30 22:15:17 +01:00
ctrl . MouseHover + = Items_MouseHover ;
}
2017-04-26 10:00:05 +02:00
}
2015-11-30 22:15:17 +01:00
control . MouseHover + = Items_MouseHover ;
}
foreach ( Button b in buttons )
{
b . MouseHover + = button_MouseHover ;
b . MouseLeave + = button_MouseLeave ;
}
2017-04-26 10:00:05 +02:00
2015-11-30 22:15:17 +01:00
inputtimer . Tick + = InputDS4 ;
sixaxisTimer . Tick + = ControllerReadout_Tick ;
sixaxisTimer . Interval = 1000 / 60 ;
2017-12-06 13:49:23 +01:00
2018-09-30 04:54:25 +02:00
triggerCondAndCombo . SelectedIndexChanged + = TriggerCondAndCombo_SelectedIndexChanged ;
2015-12-18 07:25:51 +01:00
bnGyroZN . Text = Properties . Resources . TiltUp ;
bnGyroZP . Text = Properties . Resources . TiltDown ;
bnGyroXP . Text = Properties . Resources . TiltLeft ;
bnGyroXN . Text = Properties . Resources . TiltRight ;
bnSwipeUp . Text = Properties . Resources . SwipeUp ;
bnSwipeDown . Text = Properties . Resources . SwipeDown ;
bnSwipeLeft . Text = Properties . Resources . SwipeLeft ;
bnSwipeRight . Text = Properties . Resources . SwipeRight ;
2017-12-01 11:47:10 +01:00
btnLightbar . BackgroundImage = null ;
btnLightbar . BackgroundImageLayout = ImageLayout . None ;
2017-05-05 10:28:45 +02:00
2019-04-19 05:56:18 +02:00
OutContTypeCb . SelectedIndexChanged + = OutContTypeCb_SelectedIndexChanged ;
2017-05-05 10:28:45 +02:00
populateHoverIndexDict ( ) ;
populateHoverImageDict ( ) ;
populateHoverLabelDict ( ) ;
2019-07-17 22:20:38 +02:00
2019-09-08 00:11:10 +02:00
tBLSCustomOutputCurve . Text = String . Empty ;
2019-09-03 14:21:53 +02:00
tBRSCustomOutputCurve . Text = String . Empty ;
tBL2CustomOutputCurve . Text = String . Empty ;
tBR2CustomOutputCurve . Text = String . Empty ;
tBSixXCustomOutputCurve . Text = String . Empty ;
tBSixZCustomOutputCurve . Text = String . Empty ;
2019-09-08 00:11:10 +02:00
CustomCurveChecker ( ) ;
2019-09-03 12:45:06 +02:00
SetupEvents ( ) ;
2019-09-08 00:11:10 +02:00
tp . SetToolTip ( RoundnessNUpDown , Properties . Resources . SquareStickRoundness ) ;
2019-09-14 05:26:58 +02:00
tp . SetToolTip ( RoundnessRsNUD , Properties . Resources . SquareStickRoundness ) ;
2017-05-05 10:28:45 +02:00
}
2018-09-30 04:54:25 +02:00
private void TriggerCondAndCombo_SelectedIndexChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
string temp = triggerCondAndCombo . SelectedItem . ToString ( ) . ToLower ( ) ;
SetSaTriggerCond ( device , triggerCondAndCombo . SelectedItem . ToString ( ) . ToLower ( ) ) ;
}
}
2017-05-05 10:28:45 +02:00
private void populateHoverIndexDict ( )
{
hoverIndexDict . Clear ( ) ;
hoverIndexDict [ bnCross ] = 0 ;
hoverIndexDict [ bnCircle ] = 1 ;
hoverIndexDict [ bnSquare ] = 2 ;
hoverIndexDict [ bnTriangle ] = 3 ;
hoverIndexDict [ bnOptions ] = 4 ;
hoverIndexDict [ bnShare ] = 5 ;
hoverIndexDict [ bnUp ] = 6 ;
hoverIndexDict [ bnDown ] = 7 ;
hoverIndexDict [ bnLeft ] = 8 ;
hoverIndexDict [ bnRight ] = 9 ;
hoverIndexDict [ bnPS ] = 10 ;
hoverIndexDict [ bnL1 ] = 11 ;
hoverIndexDict [ bnR1 ] = 12 ;
hoverIndexDict [ bnL2 ] = 13 ;
hoverIndexDict [ bnR2 ] = 14 ;
hoverIndexDict [ bnL3 ] = 15 ;
hoverIndexDict [ bnR3 ] = 16 ;
hoverIndexDict [ bnTouchLeft ] = 17 ;
hoverIndexDict [ bnTouchRight ] = 18 ;
hoverIndexDict [ bnTouchMulti ] = 19 ;
hoverIndexDict [ bnTouchUpper ] = 20 ;
hoverIndexDict [ bnLSUp ] = 21 ;
hoverIndexDict [ bnLSDown ] = 22 ;
hoverIndexDict [ bnLSLeft ] = 23 ;
hoverIndexDict [ bnLSRight ] = 24 ;
hoverIndexDict [ bnRSUp ] = 25 ;
hoverIndexDict [ bnRSDown ] = 26 ;
hoverIndexDict [ bnRSLeft ] = 27 ;
hoverIndexDict [ bnRSRight ] = 28 ;
hoverIndexDict [ bnGyroZN ] = 29 ;
hoverIndexDict [ bnGyroZP ] = 30 ;
hoverIndexDict [ bnGyroXP ] = 31 ;
hoverIndexDict [ bnGyroXN ] = 32 ;
hoverIndexDict [ bnSwipeUp ] = 33 ;
hoverIndexDict [ bnSwipeDown ] = 34 ;
hoverIndexDict [ bnSwipeLeft ] = 35 ;
hoverIndexDict [ bnSwipeRight ] = 36 ;
}
private void populateHoverImageDict ( )
{
hoverImageDict . Clear ( ) ;
hoverImageDict [ bnCross ] = Properties . Resources . DS4_Config_Cross ;
hoverImageDict [ bnCircle ] = Properties . Resources . DS4_Config_Circle ;
hoverImageDict [ bnSquare ] = Properties . Resources . DS4_Config_Square ;
hoverImageDict [ bnTriangle ] = Properties . Resources . DS4_Config_Triangle ;
hoverImageDict [ bnOptions ] = Properties . Resources . DS4_Config_Options ;
hoverImageDict [ bnShare ] = Properties . Resources . DS4_Config_Share ;
hoverImageDict [ bnUp ] = Properties . Resources . DS4_Config_Up ;
hoverImageDict [ bnDown ] = Properties . Resources . DS4_Config_Down ;
hoverImageDict [ bnLeft ] = Properties . Resources . DS4_Config_Left ;
hoverImageDict [ bnRight ] = Properties . Resources . DS4_Config_Right ;
hoverImageDict [ bnPS ] = Properties . Resources . DS4_Config_PS ;
hoverImageDict [ bnL1 ] = Properties . Resources . DS4_Config_L1 ;
hoverImageDict [ bnR1 ] = Properties . Resources . DS4_Config_R1 ;
hoverImageDict [ bnL2 ] = Properties . Resources . DS4_Config_L2 ;
hoverImageDict [ bnR2 ] = Properties . Resources . DS4_Config_R2 ;
hoverImageDict [ bnTouchLeft ] = Properties . Resources . DS4_Config_TouchLeft ;
hoverImageDict [ bnTouchRight ] = Properties . Resources . DS4_Config_TouchRight ;
hoverImageDict [ bnTouchMulti ] = Properties . Resources . DS4_Config_TouchMulti ;
hoverImageDict [ bnTouchUpper ] = Properties . Resources . DS4_Config_TouchUpper ;
hoverImageDict [ bnL3 ] = Properties . Resources . DS4_Config_LS ;
hoverImageDict [ bnLSUp ] = Properties . Resources . DS4_Config_LS ;
hoverImageDict [ bnLSDown ] = Properties . Resources . DS4_Config_LS ;
hoverImageDict [ bnLSLeft ] = Properties . Resources . DS4_Config_LS ;
hoverImageDict [ bnLSRight ] = Properties . Resources . DS4_Config_LS ;
hoverImageDict [ bnR3 ] = Properties . Resources . DS4_Config_RS ;
hoverImageDict [ bnRSUp ] = Properties . Resources . DS4_Config_RS ;
hoverImageDict [ bnRSDown ] = Properties . Resources . DS4_Config_RS ;
hoverImageDict [ bnRSLeft ] = Properties . Resources . DS4_Config_RS ;
hoverImageDict [ bnRSRight ] = Properties . Resources . DS4_Config_RS ;
}
private void populateHoverLabelDict ( )
{
hoverLabelDict . Clear ( ) ;
hoverLabelDict [ bnCross ] = lbLCross ;
hoverLabelDict [ bnCircle ] = lbLCircle ;
hoverLabelDict [ bnSquare ] = lbLSquare ;
hoverLabelDict [ bnTriangle ] = lbLTriangle ;
hoverLabelDict [ bnOptions ] = lbLOptions ;
hoverLabelDict [ bnShare ] = lbLShare ;
hoverLabelDict [ bnUp ] = lbLUp ;
hoverLabelDict [ bnDown ] = lbLDown ;
hoverLabelDict [ bnLeft ] = lbLLeft ;
hoverLabelDict [ bnRight ] = lbLright ;
hoverLabelDict [ bnPS ] = lbLPS ;
hoverLabelDict [ bnL1 ] = lbLL1 ;
hoverLabelDict [ bnR1 ] = lbLR1 ;
hoverLabelDict [ bnL2 ] = lbLL2 ;
hoverLabelDict [ bnR2 ] = lbLR2 ;
hoverLabelDict [ bnTouchLeft ] = lbLTouchLM ;
hoverLabelDict [ bnTouchRight ] = lbLTouchRight ;
hoverLabelDict [ bnTouchMulti ] = lbLTouchLM ;
hoverLabelDict [ bnTouchUpper ] = lbLTouchUpper ;
hoverLabelDict [ bnL3 ] = lbLLS ;
hoverLabelDict [ bnLSUp ] = lbLLS ;
hoverLabelDict [ bnLSDown ] = lbLLS ;
hoverLabelDict [ bnLSLeft ] = lbLLS ;
hoverLabelDict [ bnLSRight ] = lbLLS ;
hoverLabelDict [ bnR3 ] = lbLRS ;
hoverLabelDict [ bnRSUp ] = lbLRS ;
hoverLabelDict [ bnRSDown ] = lbLRS ;
hoverLabelDict [ bnRSLeft ] = lbLRS ;
hoverLabelDict [ bnRSRight ] = lbLRS ;
2017-04-07 03:16:12 +02:00
}
2014-12-13 21:12:03 +01:00
2019-04-19 05:56:18 +02:00
public void PopulateDS4Defaults ( )
{
ds4Defaults [ "bnSwipeUp" ] = "Swipe Up" ;
ds4Defaults [ "bnSwipeDown" ] = "Swipe Down" ;
ds4Defaults [ "bnSwipeLeft" ] = "Swipe Left" ;
ds4Defaults [ "bnSwipeRight" ] = "Swipe Right" ;
ds4Defaults [ "bnGyroZN" ] = "" ;
ds4Defaults [ "bnGyroZP" ] = "" ;
ds4Defaults [ "bnGyroXP" ] = "" ;
ds4Defaults [ "bnGyroXN" ] = "" ;
ds4Defaults [ "bnRSDown" ] = "Right Y - Axis +" ;
ds4Defaults [ "bnL3" ] = "L3" ;
ds4Defaults [ "bnRSUp" ] = "Right Y - Axis -" ;
ds4Defaults [ "bnRSRight" ] = "Right X - Axis +" ;
ds4Defaults [ "bnR3" ] = "Right Stick" ;
ds4Defaults [ "bnRSLeft" ] = "Right X - Axis -" ;
ds4Defaults [ "bnLSLeft" ] = "Left X - Axis -" ;
ds4Defaults [ "bnLSUp" ] = "Left Y - Axis -" ;
ds4Defaults [ "bnLSRight" ] = "Left X - Axis +" ;
ds4Defaults [ "bnLSDown" ] = "Left Y - Axis +" ;
ds4Defaults [ "bnR2" ] = "R2" ;
ds4Defaults [ "bnUp" ] = "Dpad Up" ;
ds4Defaults [ "bnDown" ] = "Dpad Down" ;
ds4Defaults [ "bnTriangle" ] = "Triangle" ;
ds4Defaults [ "bnR1" ] = "R1" ;
ds4Defaults [ "bnSquare" ] = "Square" ;
ds4Defaults [ "bnRight" ] = "Dpad Right" ;
ds4Defaults [ "bnLeft" ] = "Dpad Left" ;
ds4Defaults [ "bnOptions" ] = "Options" ;
ds4Defaults [ "bnShare" ] = "Share" ;
ds4Defaults [ "bnL1" ] = "L1" ;
ds4Defaults [ "bnTouchRight" ] = "Left Mouse Button" ;
ds4Defaults [ "bnL2" ] = "L2" ;
ds4Defaults [ "bnTouchLeft" ] = "Left Mouse Button" ;
ds4Defaults [ "bnTouchMulti" ] = "Right Mouse Button" ;
ds4Defaults [ "bnTouchUpper" ] = "Middle Mouse Button" ;
ds4Defaults [ "bnPS" ] = "PS" ;
ds4Defaults [ "bnCross" ] = "Cross" ;
ds4Defaults [ "bnCircle" ] = "Circle" ;
}
2019-09-03 12:45:06 +02:00
private void SetupEvents ( )
{
// Axis Config Events
nUDLS . ValueChanged + = numUDLS_ValueChanged ;
nUDLSMaxZone . ValueChanged + = nUDLSMaxZone_ValueChanged ;
nUDLSAntiDead . ValueChanged + = nUDLSMaxZone_ValueChanged ;
nUDLSS . ValueChanged + = nUDLSSens_ValueChanged ;
lsOutCurveComboBox . SelectedIndexChanged + = lsOutCurveComboBox_SelectedIndexChanged ;
lsSquStickCk . Click + = lsSquStickCk_Click ;
RoundnessNUpDown . ValueChanged + = RoundnessNUpDown_ValueChanged ;
nUDLSCurve . ValueChanged + = nUDLSCurve_ValueChanged ;
nUDLSRotation . ValueChanged + = nUDLSRotation_ValueChanged ;
2019-09-08 00:11:10 +02:00
tBLSCustomOutputCurve . Leave + = tBCustomOutputCurve_Leave ;
2019-09-14 05:08:26 +02:00
BtnLSCurveEditor . Click + = BtnCurveEditor_Click ;
2019-09-03 12:45:06 +02:00
nUDRS . ValueChanged + = numUDRS_ValueChanged ;
nUDRSMaxZone . ValueChanged + = nUDRSMaxZone_ValueChanged ;
nUDRSAntiDead . ValueChanged + = nUDRSAntiDead_ValueChanged ;
nUDRSS . ValueChanged + = nUDRSSens_ValueChanged ;
rsOutCurveComboBox . SelectedIndexChanged + = rsOutCurveComboBox_SelectedIndexChanged ;
2019-09-03 14:21:53 +02:00
tBRSCustomOutputCurve . Leave + = TBRSCustomOutputCurve_Leave ;
2019-09-14 05:08:26 +02:00
btnRSCurveEditor . Click + = BtnCurveEditor_Click ;
2019-09-03 12:45:06 +02:00
rsSquStickCk . Click + = rsSquStickCk_Click ;
2019-09-14 05:26:58 +02:00
RoundnessRsNUD . ValueChanged + = RoundnessRsNUD_ValueChanged ;
2019-09-03 12:45:06 +02:00
nUDRSCurve . ValueChanged + = nUDRSCurve_ValueChanged ;
nUDRSRotation . ValueChanged + = nUDRSRotation_ValueChanged ;
nUDL2 . ValueChanged + = numUDL2_ValueChanged ;
nUDL2Maxzone . ValueChanged + = nUDL2Maxzone_ValueChanged ;
nUDL2AntiDead . ValueChanged + = nUDL2AntiDead_ValueChanged ;
nUDL2S . ValueChanged + = nUDL2Sens_ValueChanged ;
cBL2OutputCurve . SelectedIndexChanged + = cBL2OutputCurve_SelectedIndexChanged ;
2019-09-03 14:21:53 +02:00
tBL2CustomOutputCurve . Leave + = TBL2CustomOutputCurve_Leave ;
2019-09-14 05:08:26 +02:00
btnL2CurveEditor . Click + = BtnCurveEditor_Click ;
2019-09-03 12:45:06 +02:00
nUDR2 . ValueChanged + = numUDR2_ValueChanged ;
nUDR2Maxzone . ValueChanged + = nUDR2Maxzone_ValueChanged ;
nUDR2AntiDead . ValueChanged + = nUDR2AntiDead_ValueChanged ;
nUDR2S . ValueChanged + = nUDR2Sens_ValueChanged ;
cBR2OutputCurve . SelectedIndexChanged + = cBR2OutputCurve_SelectedIndexChanged ;
2019-09-03 14:21:53 +02:00
tBR2CustomOutputCurve . Leave + = TBR2CustomOutputCurve_Leave ;
2019-09-14 05:08:26 +02:00
btnR2CurveEditor . Click + = BtnCurveEditor_Click ;
2019-09-03 12:45:06 +02:00
nUDSX . ValueChanged + = nUDSX_ValueChanged ;
nUDSZ . ValueChanged + = nUDSZ_ValueChanged ;
nUDSixAxisXMaxZone . ValueChanged + = nUDSixAxisXMaxZone_ValueChanged ;
nUDSixAxisZMaxZone . ValueChanged + = nUDSixAxisZMaxZone_ValueChanged ;
nUDSixaxisXAntiDead . ValueChanged + = nUDSixaxisXAntiDead_ValueChanged ;
nUDSixaxisZAntiDead . ValueChanged + = nUDSixaxisZAntiDead_ValueChanged ;
nUDSXS . ValueChanged + = nUDSXSens_ValueChanged ;
nUDSZS . ValueChanged + = nUDSZSens_ValueChanged ;
cBSixaxisXOutputCurve . SelectedIndexChanged + = cBSixaxisXOutputCurve_SelectedIndexChanged ;
2019-09-03 14:21:53 +02:00
tBSixXCustomOutputCurve . Leave + = TBSixXCustomOutputCurve_Leave ;
2019-09-14 05:08:26 +02:00
btnSixXCurveEditor . Click + = BtnCurveEditor_Click ;
2019-09-03 12:45:06 +02:00
cBSixaxisZOutputCurve . SelectedIndexChanged + = cBSixaxisZOutputCurve_SelectedIndexChanged ;
2019-09-03 14:21:53 +02:00
tBSixZCustomOutputCurve . Leave + = TBSixZCustomOutputCurve_Leave ;
2019-09-14 05:08:26 +02:00
btnSixZCurveEditor . Click + = BtnCurveEditor_Click ;
2019-09-03 12:45:06 +02:00
// Gyro events
gyroOutputMode . SelectedIndexChanged + = GyroOutputMode_SelectedIndexChanged ;
btnGyroMStickTrig . Click + = BtnGyroMStickTrig_Click ;
gyroMStickTrigBehaveCk . CheckedChanged + = GyroMStickTrigBehaveCk_CheckedChanged ;
gyroMStickToggleCk . CheckedChanged + = GyroMStickToggleCk_CheckedChanged ;
gyroMouseStickDZ . ValueChanged + = GyroMouseStickDZ_ValueChanged ;
gyroMouseStickMaxZ . ValueChanged + = GyroMouseStickMaxZ_ValueChanged ;
gyroMouseStickAntiDeadX . ValueChanged + = GyroMouseStickAntiDeadX_ValueChanged ;
gyroMouseStickAntiDeadY . ValueChanged + = GyroMouseSStickAntiDeadY_ValueChanged ;
gyroMStickVertScaleNUD . ValueChanged + = GyroMStickVertScaleNUD_ValueChanged ;
gyroMouseStickEvalCombo . SelectedIndexChanged + = GyroMouseStickEvalCombo_SelectedIndexChanged ;
2019-09-03 13:20:05 +02:00
gyroMousestickXAxisCom . SelectedIndexChanged + = GyroMousestickXAxisCom_SelectedIndexChanged ;
2019-09-03 12:45:06 +02:00
gyroMouseStickInvertXCk . CheckedChanged + = GyroMouseStickInvert_CheckedChanged ;
gyroMouseStickInvertYCk . CheckedChanged + = GyroMouseStickInvert_CheckedChanged ;
gyroMStickUseSmoothCk . CheckedChanged + = GyroMStickUseSmoothCk_CheckedChanged ;
gyroMStickSmoothWeightNUD . ValueChanged + = GyroMStickSmoothWeightNUD_ValueChanged ;
// Gyro Mouse
btnGyroTriggers . Click + = btnGyroTriggers_Click ;
gyroTriggerBehavior . CheckedChanged + = gyroTriggerBehavior_CheckedChanged ;
nUDGyroSensitivity . ValueChanged + = nUDGyroSensitivity_ValueChanged ;
nUDGyroMouseVertScale . ValueChanged + = nUDGyroMouseVertScale_ValueChanged ;
triggerCondAndCombo . SelectedIndexChanged + = TriggerCondAndCombo_SelectedIndexChanged ;
cBGyroMouseXAxis . SelectedIndexChanged + = cBGyroMouseXAxis_SelectedIndexChanged ;
cBGyroInvertX . CheckedChanged + = cBGyroInvert_CheckChanged ;
cBGyroInvertY . CheckedChanged + = cBGyroInvert_CheckChanged ;
cBGyroSmooth . CheckedChanged + = cBGyroSmooth_CheckedChanged ;
nUDGyroSmoothWeight . ValueChanged + = nUDGyroSmoothWeight_ValueChanged ;
gyroMouseDzNUD . ValueChanged + = gyroMouseDzNUD_ValueChanged ;
toggleGyroMCb . CheckedChanged + = toggleGyroMCb_Click ;
// Gyro Controls
2019-09-03 12:53:10 +02:00
bnGyroZN . Click + = Show_ControlsBn ;
bnGyroZP . Click + = Show_ControlsBn ;
bnGyroXP . Click + = Show_ControlsBn ;
bnGyroXN . Click + = Show_ControlsBn ;
2019-09-03 12:45:06 +02:00
cBSteeringWheelEmulationAxis . SelectedIndexChanged + = cBSteeringWheelEmulationAxis_SelectedIndexChanged ;
cBSteeringWheelEmulationRange . SelectedIndexChanged + = cBSteeringWheelEmulationRange_SelectedIndexChanged ;
btnSteeringWheelEmulationCalibrate . Click + = btnSteeringWheelEmulationCalibrate_Click ;
// Lightbar Events
lbEmpty . Click + = lbEmpty_Click ;
lowColorChooserButton . Click + = lowColorChooserButton_Click ;
tBRedBar . ValueChanged + = MainBar_ValueChanged ;
tBGreenBar . ValueChanged + = MainBar_ValueChanged ;
tBBlueBar . ValueChanged + = MainBar_ValueChanged ;
tBLowRedBar . ValueChanged + = LowBar_ValueChanged ;
tBLowGreenBar . ValueChanged + = LowBar_ValueChanged ;
tBLowBlueBar . ValueChanged + = LowBar_ValueChanged ;
btnFlashColor . Click + = btnFlashColor_Click ;
btnChargingColor . Click + = btnChargingColor_Click ;
cBWhileCharging . SelectedIndexChanged + = cBWhileCharging_SelectedIndexChanged ;
nUDflashLED . ValueChanged + = nUDflashLED_ValueChanged ;
cBFlashType . SelectedIndexChanged + = cBFlashType_SelectedIndexChanged ;
cBLightbyBattery . Click + = ledAsBatteryIndicator_CheckedChanged ;
btnRainbow . Click + = btnRainbow_Click ;
nUDRainbow . ValueChanged + = numUDRainbow_ValueChanged ;
2019-09-06 17:50:20 +02:00
maxRainSatTB . ValueChanged + = MaxRainSatTB_ValueChanged ;
2019-09-03 12:45:06 +02:00
// Other events
nUDRumbleBoost . ValueChanged + = rumbleBoostBar_ValueChanged ;
btnRumbleHeavyTest . Click + = btnRumbleHeavyTest_Click ;
btnRumbleLightTest . Click + = btnRumbleLightTest_Click ;
cBControllerInput . CheckedChanged + = cBControllerInput_CheckedChanged ;
numUDMouseSens . ValueChanged + = numUDMouseSens_ValueChanged ;
cBMouseAccel . CheckedChanged + = cBMouseAccel_CheckedChanged ;
enableTouchToggleCheckbox . CheckedChanged + = enableTouchToggleCheckbox_CheckedChanged ;
cBLaunchProgram . CheckedChanged + = cBLaunchProgram_CheckedChanged ;
btnBrowse . Click + = btnBrowse_Click ;
cBDinput . Click + = CBDinput_CheckedChanged ;
cBFlushHIDQueue . CheckedChanged + = flushHIDQueue_CheckedChanged ;
cBIdleDisconnect . CheckedChanged + = cBIdleDisconnect_CheckedChanged ;
nUDIdleDisconnect . ValueChanged + = nUDIdleDisconnect_ValueChanged ;
btPollRateComboBox . SelectedIndexChanged + = btPollRateComboBox_SelectedIndexChanged ;
OutContTypeCb . SelectedIndexChanged + = OutContTypeCb_SelectedIndexChanged ;
}
2019-09-14 05:26:58 +02:00
private void RoundnessRsNUD_ValueChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
SquStickInfo [ device ] . rsRoundness = ( double ) RoundnessRsNUD . Value ;
}
}
2019-09-06 17:50:20 +02:00
private void MaxRainSatTB_ValueChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
MaxSatRainbow [ device ] = maxRainSatTB . Value / 100.0 ;
}
}
2019-09-08 00:11:10 +02:00
private void BtnCurveEditor_Click ( object sender , EventArgs e )
2019-09-03 14:21:53 +02:00
{
2019-09-08 00:11:10 +02:00
if ( sender = = BtnLSCurveEditor ) LaunchCurveEditor ( lsOutBezierCurveObj [ device ] . ToString ( ) ) ;
else if ( sender = = btnRSCurveEditor ) LaunchCurveEditor ( rsOutBezierCurveObj [ device ] . ToString ( ) ) ;
else if ( sender = = btnL2CurveEditor ) LaunchCurveEditor ( l2OutBezierCurveObj [ device ] . ToString ( ) ) ;
else if ( sender = = btnR2CurveEditor ) LaunchCurveEditor ( r2OutBezierCurveObj [ device ] . ToString ( ) ) ;
else if ( sender = = btnSixXCurveEditor ) LaunchCurveEditor ( sxOutBezierCurveObj [ device ] . ToString ( ) ) ;
else if ( sender = = btnSixZCurveEditor ) LaunchCurveEditor ( szOutBezierCurveObj [ device ] . ToString ( ) ) ;
2019-09-03 14:21:53 +02:00
}
private void TBSixZCustomOutputCurve_Leave ( object sender , EventArgs e )
{
if ( loading = = false )
{
if ( cBSixaxisZOutputCurve . SelectedIndex = = cBSixaxisZOutputCurve . Items . Count - 1 )
2019-09-08 00:11:10 +02:00
szOutBezierCurveObj [ device ] . InitBezierCurve ( tBSixZCustomOutputCurve . Text , BezierCurve . AxisType . SA , true ) ;
2019-09-03 14:21:53 +02:00
}
}
private void TBSixXCustomOutputCurve_Leave ( object sender , EventArgs e )
{
if ( loading = = false )
{
if ( cBSixaxisXOutputCurve . SelectedIndex = = cBSixaxisXOutputCurve . Items . Count - 1 )
2019-09-08 00:11:10 +02:00
sxOutBezierCurveObj [ device ] . InitBezierCurve ( tBSixXCustomOutputCurve . Text , BezierCurve . AxisType . SA , true ) ;
2019-09-03 14:21:53 +02:00
}
}
private void TBR2CustomOutputCurve_Leave ( object sender , EventArgs e )
{
if ( loading = = false )
{
if ( cBR2OutputCurve . SelectedIndex = = cBR2OutputCurve . Items . Count - 1 )
2019-09-08 00:11:10 +02:00
r2OutBezierCurveObj [ device ] . InitBezierCurve ( tBR2CustomOutputCurve . Text , BezierCurve . AxisType . L2R2 , true ) ;
2019-09-03 14:21:53 +02:00
}
}
private void TBL2CustomOutputCurve_Leave ( object sender , EventArgs e )
{
if ( loading = = false )
{
if ( cBL2OutputCurve . SelectedIndex = = cBL2OutputCurve . Items . Count - 1 )
2019-09-08 00:11:10 +02:00
l2OutBezierCurveObj [ device ] . InitBezierCurve ( tBL2CustomOutputCurve . Text , BezierCurve . AxisType . L2R2 , true ) ;
}
}
private void tBCustomOutputCurve_Leave ( object sender , EventArgs e )
{
if ( loading = = false )
{
// Focus leaves the custom output curve editbox. Store the new custom curve value into LS/RS/L2/R2/SX/SZ bezierCurve object
if ( lsOutCurveComboBox . SelectedIndex = = lsOutCurveComboBox . Items . Count - 1 )
lsOutBezierCurveObj [ device ] . InitBezierCurve ( tBLSCustomOutputCurve . Text , BezierCurve . AxisType . LSRS , true ) ;
2019-09-03 14:21:53 +02:00
}
}
private void TBRSCustomOutputCurve_Leave ( object sender , EventArgs e )
{
if ( loading = = false )
{
if ( rsOutCurveComboBox . SelectedIndex = = rsOutCurveComboBox . Items . Count - 1 )
2019-09-08 00:11:10 +02:00
rsOutBezierCurveObj [ device ] . InitBezierCurve ( tBRSCustomOutputCurve . Text , BezierCurve . AxisType . LSRS , true ) ;
2019-09-03 14:21:53 +02:00
}
}
2015-11-30 22:15:17 +01:00
public void Reload ( int deviceNum , string name )
{
loading = true ;
device = deviceNum ;
filename = name ;
lBControls . SelectedIndex = - 1 ;
lbControlName . Text = "" ;
tCControls . SelectedIndex = 0 ;
Graphics g = this . CreateGraphics ( ) ;
try
{
dpix = g . DpiX / 100f * 1.041666666667f ;
dpiy = g . DpiY / 100f * 1.041666666667f ;
}
finally
{
g . Dispose ( ) ;
}
//butts += "\n" + b.Name;
//MessageBox.Show(butts);
root . lbLastMessage . ForeColor = Color . Black ;
root . lbLastMessage . Text = "Hover over items to see description or more about" ;
if ( device < 4 )
nUDSixaxis . Value = deviceNum + 1 ;
2017-04-26 23:51:15 +02:00
2017-05-20 12:38:12 +02:00
lVActions . ItemCheck - = this . lVActions_ItemCheck ;
2015-11-30 22:15:17 +01:00
if ( filename ! = "" )
{
if ( device = = 4 ) //if temp device is called
ProfilePath [ 4 ] = name ;
2017-04-26 23:51:15 +02:00
2015-12-18 07:25:51 +01:00
LoadProfile ( device , false , Program . rootHub ) ;
2015-11-30 22:15:17 +01:00
2019-04-19 05:56:18 +02:00
Global . outDevTypeTemp [ device ] = Global . OutContType [ device ] ;
2019-04-18 08:12:10 +02:00
2015-11-30 22:15:17 +01:00
if ( Rainbow [ device ] = = 0 )
{
2015-12-13 22:30:54 +01:00
btnRainbow . Image = greyscale ;
2015-11-30 22:15:17 +01:00
ToggleRainbow ( false ) ;
}
else
{
2015-12-13 22:30:54 +01:00
btnRainbow . Image = colored ;
2015-11-30 22:15:17 +01:00
ToggleRainbow ( true ) ;
}
2017-04-26 23:51:15 +02:00
2015-11-30 22:15:17 +01:00
DS4Color color = MainColor [ device ] ;
tBRedBar . Value = color . red ;
tBGreenBar . Value = color . green ;
tBBlueBar . Value = color . blue ;
alphacolor = Math . Max ( tBRedBar . Value , Math . Max ( tBGreenBar . Value , tBBlueBar . Value ) ) ;
reg = Color . FromArgb ( color . red , color . green , color . blue ) ;
full = HuetoRGB ( reg . GetHue ( ) , reg . GetBrightness ( ) , reg ) ;
main = Color . FromArgb ( ( alphacolor > 205 ? 255 : ( alphacolor + 50 ) ) , full ) ;
2017-12-01 11:47:10 +01:00
btnLightBgImg = RecolorImage ( btnLightBg , main ) ;
btnLightbar . Refresh ( ) ;
2015-11-30 22:15:17 +01:00
cBLightbyBattery . Checked = LedAsBatteryIndicator [ device ] ;
nUDflashLED . Value = FlashAt [ device ] ;
pnlLowBattery . Visible = cBLightbyBattery . Checked ;
lbFull . Text = ( cBLightbyBattery . Checked ? "Full:" : "Color:" ) ;
//pnlFull.Location = new Point(pnlFull.Location.X, (cBLightbyBattery.Checked ? (int)(dpix * 42) : (pnlFull.Location.Y + pnlLowBattery.Location.Y) / 2));
DS4Color lowColor = LowColor [ device ] ;
tBLowRedBar . Value = lowColor . red ;
tBLowGreenBar . Value = lowColor . green ;
tBLowBlueBar . Value = lowColor . blue ;
2016-10-09 05:21:44 +02:00
2015-11-30 22:15:17 +01:00
DS4Color cColor = ChargingColor [ device ] ;
btnChargingColor . BackColor = Color . FromArgb ( cColor . red , cColor . green , cColor . blue ) ;
2017-05-17 08:02:12 +02:00
byte tempFlashType = FlashType [ device ] ;
if ( tempFlashType > cBFlashType . Items . Count - 1 )
2015-11-30 22:15:17 +01:00
cBFlashType . SelectedIndex = 0 ;
else
2017-05-17 08:02:12 +02:00
cBFlashType . SelectedIndex = tempFlashType ;
2017-04-26 23:51:15 +02:00
2015-11-30 22:15:17 +01:00
DS4Color fColor = FlashColor [ device ] ;
if ( fColor . Equals ( new DS4Color { red = 0 , green = 0 , blue = 0 } ) )
2017-04-26 23:51:15 +02:00
{
2015-11-30 22:15:17 +01:00
if ( Rainbow [ device ] = = 0 )
btnFlashColor . BackColor = main ;
else
btnFlashColor . BackgroundImage = rainbowImg ;
2017-04-26 23:51:15 +02:00
}
2015-11-30 22:15:17 +01:00
else
btnFlashColor . BackColor = Color . FromArgb ( fColor . red , fColor . green , fColor . blue ) ;
2017-04-26 23:51:15 +02:00
2019-09-06 17:50:20 +02:00
maxRainSatTB . Value = ( int ) ( MaxSatRainbow [ device ] * 100.0 ) ;
2015-11-30 22:15:17 +01:00
nUDRumbleBoost . Value = RumbleBoost [ device ] ;
nUDTouch . Value = TouchSensitivity [ device ] ;
cBSlide . Checked = TouchSensitivity [ device ] > 0 ;
nUDScroll . Value = ScrollSensitivity [ device ] ;
cBScroll . Checked = ScrollSensitivity [ device ] ! = 0 ;
nUDTap . Value = TapSensitivity [ device ] ;
cBTap . Checked = TapSensitivity [ device ] > 0 ;
cBDoubleTap . Checked = DoubleTap [ device ] ;
cBTouchpadJitterCompensation . Checked = TouchpadJitterCompensation [ device ] ;
2017-07-13 05:39:46 +02:00
tempInt = TouchpadInvert [ device ] ;
2019-10-04 21:46:57 +02:00
// Array values are set up so Array.IndexOf call is not necessary
2017-07-13 05:39:46 +02:00
touchpadInvertComboBox . SelectedIndex = touchpadInvertToValue [ tempInt ] ;
2015-11-30 22:15:17 +01:00
cBlowerRCOn . Checked = LowerRCOn [ device ] ;
cBFlushHIDQueue . Checked = FlushHIDQueue [ device ] ;
2017-04-26 23:51:15 +02:00
enableTouchToggleCheckbox . Checked = getEnableTouchToggle ( device ) ;
2015-11-30 22:15:17 +01:00
nUDIdleDisconnect . Value = Math . Round ( ( decimal ) ( IdleDisconnectTimeout [ device ] / 60d ) , 1 ) ;
cBIdleDisconnect . Checked = IdleDisconnectTimeout [ device ] > 0 ;
numUDMouseSens . Value = ButtonMouseSensitivity [ device ] ;
cBMouseAccel . Checked = MouseAccel [ device ] ;
pBHoveredButton . Image = null ;
alphacolor = Math . Max ( tBLowRedBar . Value , Math . Max ( tBGreenBar . Value , tBBlueBar . Value ) ) ;
reg = Color . FromArgb ( lowColor . red , lowColor . green , lowColor . blue ) ;
full = HuetoRGB ( reg . GetHue ( ) , reg . GetBrightness ( ) , reg ) ;
lowColorChooserButton . BackColor = Color . FromArgb ( ( alphacolor > 205 ? 255 : ( alphacolor + 50 ) ) , full ) ;
nUDRainbow . Value = ( decimal ) Rainbow [ device ] ;
2017-05-17 08:02:12 +02:00
int tempWhileCharging = ChargingType [ device ] ;
if ( tempWhileCharging > cBWhileCharging . Items . Count - 1 )
2015-11-30 22:15:17 +01:00
cBWhileCharging . SelectedIndex = 0 ;
else
2017-05-17 08:02:12 +02:00
cBWhileCharging . SelectedIndex = tempWhileCharging ;
btPollRateComboBox . SelectedIndex = getBTPollRate ( device ) ;
2017-06-08 09:37:04 +02:00
lsOutCurveComboBox . SelectedIndex = getLsOutCurveMode ( device ) ;
rsOutCurveComboBox . SelectedIndex = getRsOutCurveMode ( device ) ;
2017-07-19 22:15:59 +02:00
cBL2OutputCurve . SelectedIndex = getL2OutCurveMode ( device ) ;
cBR2OutputCurve . SelectedIndex = getR2OutCurveMode ( device ) ;
2017-07-20 01:17:11 +02:00
cBSixaxisXOutputCurve . SelectedIndex = getSXOutCurveMode ( device ) ;
cBSixaxisZOutputCurve . SelectedIndex = getSZOutCurveMode ( device ) ;
2017-04-26 23:51:15 +02:00
2019-07-25 21:54:39 +02:00
CustomCurveChecker ( ) ;
2016-10-09 05:21:44 +02:00
try
{
2019-07-01 03:59:51 +02:00
nUDL2 . Value = Math . Round ( ( decimal ) L2ModInfo [ device ] . deadZone / 255 , 2 ) ;
2016-10-09 05:21:44 +02:00
}
catch
{
nUDL2 . Value = 0 ;
}
try
{
2019-07-01 03:59:51 +02:00
nUDR2 . Value = Math . Round ( ( decimal ) R2ModInfo [ device ] . deadZone / 255 , 2 ) ;
2016-10-09 05:21:44 +02:00
}
catch
{
nUDR2 . Value = 0 ;
}
2017-03-30 09:37:01 +02:00
try
{
2019-07-01 03:59:51 +02:00
nUDL2AntiDead . Value = ( decimal ) ( L2ModInfo [ device ] . antiDeadZone / 100d ) ;
2017-03-30 09:37:01 +02:00
}
catch
{
nUDL2AntiDead . Value = 0 ;
}
try
{
2019-07-01 03:59:51 +02:00
nUDR2AntiDead . Value = ( decimal ) ( R2ModInfo [ device ] . antiDeadZone / 100d ) ;
2017-03-30 09:37:01 +02:00
}
catch
{
nUDR2AntiDead . Value = 0 ;
}
2017-05-05 18:13:12 +02:00
try
{
2019-07-01 03:59:51 +02:00
nUDL2Maxzone . Value = ( decimal ) ( L2ModInfo [ device ] . maxZone / 100d ) ;
2017-05-05 18:13:12 +02:00
}
catch
{
nUDL2Maxzone . Value = 1 ;
}
try
{
2019-07-01 03:59:51 +02:00
nUDR2Maxzone . Value = ( decimal ) ( R2ModInfo [ device ] . maxZone / 100d ) ;
2017-05-05 18:13:12 +02:00
}
catch
{
nUDR2Maxzone . Value = 1 ;
}
2016-10-09 05:21:44 +02:00
try
{
2019-06-30 07:40:24 +02:00
nUDLS . Value = Math . Round ( ( decimal ) ( LSModInfo [ device ] . deadZone / 127d ) , 3 ) ;
2016-10-09 05:21:44 +02:00
}
catch
{
2019-08-30 20:32:56 +02:00
nUDLS . Value = 0.08 m ;
2016-10-09 05:21:44 +02:00
}
try
{
2019-06-30 07:40:24 +02:00
nUDRS . Value = Math . Round ( ( decimal ) ( RSModInfo [ device ] . deadZone / 127d ) , 3 ) ;
2016-10-09 05:21:44 +02:00
}
catch
{
2019-08-30 20:32:56 +02:00
nUDRS . Value = 0.08 m ;
2016-10-09 05:21:44 +02:00
}
2017-03-30 09:37:01 +02:00
2016-10-09 05:21:44 +02:00
try
2017-03-27 11:50:32 +02:00
{
2019-06-30 07:40:24 +02:00
nUDLSAntiDead . Value = ( decimal ) ( LSModInfo [ device ] . antiDeadZone / 100d ) ;
2017-03-27 11:50:32 +02:00
}
catch
{
2019-08-30 20:32:56 +02:00
nUDLSAntiDead . Value = 0.20 m ;
2017-03-27 11:50:32 +02:00
}
try
{
2019-06-30 07:40:24 +02:00
nUDRSAntiDead . Value = ( decimal ) ( RSModInfo [ device ] . antiDeadZone / 100d ) ;
2017-03-27 11:50:32 +02:00
}
catch
{
2019-08-30 20:32:56 +02:00
nUDRSAntiDead . Value = 0.20 m ;
2017-03-27 11:50:32 +02:00
}
2017-03-30 09:37:01 +02:00
2017-05-05 18:13:12 +02:00
try
{
2019-06-30 07:40:24 +02:00
nUDLSMaxZone . Value = ( decimal ) ( LSModInfo [ device ] . maxZone / 100d ) ;
2017-05-05 18:13:12 +02:00
}
catch
{
nUDLSMaxZone . Value = 1 ;
}
try
{
2019-06-30 07:40:24 +02:00
nUDRSMaxZone . Value = ( decimal ) ( RSModInfo [ device ] . maxZone / 100d ) ;
2017-05-05 18:13:12 +02:00
}
catch
{
nUDRSMaxZone . Value = 1 ;
}
2017-06-30 10:42:19 +02:00
try
{
nUDLSRotation . Value = ( decimal ) ( LSRotation [ device ] * 180.0 / Math . PI ) ;
}
catch
{
nUDLSRotation . Value = 0.0 m ;
}
try
{
nUDRSRotation . Value = ( decimal ) ( RSRotation [ device ] * 180.0 / Math . PI ) ;
}
catch
{
nUDRSRotation . Value = 0.0 m ;
}
2017-03-27 11:50:32 +02:00
try
2016-10-09 05:21:44 +02:00
{
nUDSX . Value = ( decimal ) SXDeadzone [ device ] ;
}
catch
{
2019-04-21 07:13:09 +02:00
nUDSX . Value = 0.25 m ;
2016-10-09 05:21:44 +02:00
}
2017-07-19 00:28:16 +02:00
2016-10-09 05:21:44 +02:00
try
{
nUDSZ . Value = ( decimal ) SZDeadzone [ device ] ;
}
catch
{
2019-04-21 07:13:09 +02:00
nUDSZ . Value = 0.25 m ;
2016-10-09 05:21:44 +02:00
}
2017-07-19 00:28:16 +02:00
try
{
nUDSixAxisXMaxZone . Value = ( decimal ) SXMaxzone [ device ] ;
}
catch
{
nUDSixAxisXMaxZone . Value = 1.0 m ;
}
try
{
nUDSixAxisZMaxZone . Value = ( decimal ) SZMaxzone [ device ] ;
}
catch
{
nUDSixAxisZMaxZone . Value = 1.0 m ;
}
2017-07-19 02:44:55 +02:00
try
{
nUDSixaxisXAntiDead . Value = ( decimal ) SXAntiDeadzone [ device ] ;
}
catch
{
nUDSixaxisXAntiDead . Value = 0.0 m ;
}
try
{
nUDSixaxisZAntiDead . Value = ( decimal ) SZAntiDeadzone [ device ] ;
}
catch
{
nUDSixaxisZAntiDead . Value = 0.0 m ;
}
2016-10-09 05:21:44 +02:00
try
{
nUDL2S . Value = Math . Round ( ( decimal ) L2Sens [ device ] , 2 ) ;
}
catch
{
nUDL2S . Value = 1 ;
}
try
{
nUDR2S . Value = Math . Round ( ( decimal ) R2Sens [ device ] , 2 ) ;
}
catch
{
nUDR2S . Value = 1 ;
}
try
{
nUDLSS . Value = Math . Round ( ( decimal ) LSSens [ device ] , 2 ) ;
}
catch
{
nUDLSS . Value = 1 ;
}
try
{
nUDRSS . Value = Math . Round ( ( decimal ) RSSens [ device ] , 2 ) ;
}
catch
{
nUDRSS . Value = 1 ;
}
try
{
nUDSXS . Value = Math . Round ( ( decimal ) SXSens [ device ] , 2 ) ;
}
catch
{
nUDSXS . Value = 1 ;
}
try
{
nUDSZS . Value = Math . Round ( ( decimal ) SZSens [ device ] , 2 ) ;
}
catch
{
nUDSZS . Value = 1 ;
}
2017-04-26 23:51:15 +02:00
2015-11-30 22:15:17 +01:00
if ( LaunchProgram [ device ] ! = string . Empty )
{
cBLaunchProgram . Checked = true ;
pBProgram . Image = Icon . ExtractAssociatedIcon ( LaunchProgram [ device ] ) . ToBitmap ( ) ;
btnBrowse . Text = Path . GetFileNameWithoutExtension ( LaunchProgram [ device ] ) ;
}
2017-04-26 23:51:15 +02:00
2019-06-26 08:35:41 +02:00
lsSquStickCk . Checked = SquStickInfo [ device ] . lsMode ;
rsSquStickCk . Checked = SquStickInfo [ device ] . rsMode ;
2019-09-14 05:26:58 +02:00
RoundnessNUpDown . Value = ( decimal ) SquStickInfo [ device ] . lsRoundness ;
RoundnessRsNUD . Value = ( decimal ) SquStickInfo [ device ] . rsRoundness ;
2019-03-05 00:21:58 +01:00
2015-11-30 22:15:17 +01:00
cBDinput . Checked = DinputOnly [ device ] ;
olddinputcheck = cBDinput . Checked ;
cbStartTouchpadOff . Checked = StartTouchpadOff [ device ] ;
rBTPControls . Checked = UseTPforControls [ device ] ;
rBTPMouse . Checked = ! UseTPforControls [ device ] ;
2019-08-23 05:03:03 +02:00
GyroOutMode gyroOut = GyroOutputMode [ device ] ;
if ( gyroOut = = GyroOutMode . Mouse )
{
pnlSAMouse . Visible = true ;
fLPTiltControls . Visible = false ;
gyroMouseJoyFLP . Visible = false ;
gyroOutputMode . SelectedIndex = 1 ;
}
else if ( gyroOut = = GyroOutMode . Controls )
{
pnlSAMouse . Visible = false ;
fLPTiltControls . Visible = true ;
gyroMouseJoyFLP . Visible = false ;
gyroOutputMode . SelectedIndex = 0 ;
}
else if ( gyroOut = = GyroOutMode . MouseJoystick )
{
pnlSAMouse . Visible = false ;
fLPTiltControls . Visible = false ;
gyroMouseJoyFLP . Visible = true ;
gyroOutputMode . SelectedIndex = 2 ;
}
2015-11-30 22:15:17 +01:00
nUDLSCurve . Value = LSCurve [ device ] ;
nUDRSCurve . Value = RSCurve [ device ] ;
cBControllerInput . Checked = DS4Mapping ;
2018-01-01 19:21:35 +01:00
trackballCk . Checked = TrackballMode [ device ] ;
trackFrictionNUD . Value = ( decimal ) TrackballFriction [ device ] ;
if ( device < 4 )
{
Program . rootHub . touchPad [ device ] ? . ResetTrackAccel ( TrackballFriction [ device ] ) ;
}
2015-11-30 22:15:17 +01:00
2019-08-24 04:39:22 +02:00
ResetGyroTriggers ( true ) ;
2017-09-21 05:04:22 +02:00
for ( int i = 0 , arlen = cMTouchDisableInvert . Items . Count ; i < arlen ; i + + )
{
( ( ToolStripMenuItem ) cMTouchDisableInvert . Items [ i ] ) . Checked = false ;
}
2019-08-23 05:03:03 +02:00
string [ ] satriggers ;
satriggers = SATriggers [ device ] . Split ( ',' ) ;
btnGyroTriggers . Text = GetGyroTriggerActionString ( ref satriggers ) ;
2019-08-24 04:39:22 +02:00
if ( gyroOut = = GyroOutMode . Mouse ) MarkCurrentGyroTriggers ( ref satriggers , true ) ;
2017-08-05 05:36:46 +02:00
2019-08-23 05:03:03 +02:00
satriggers = SAMousestickTriggers [ device ] . Split ( ',' ) ;
btnGyroMStickTrig . Text = GetGyroTriggerActionString ( ref satriggers ) ;
2019-08-24 04:39:22 +02:00
if ( gyroOut = = GyroOutMode . MouseJoystick ) MarkCurrentGyroTriggers ( ref satriggers , true ) ;
2017-08-05 05:36:46 +02:00
2019-08-23 05:03:03 +02:00
List < string > s = new List < string > ( ) ;
2017-08-05 05:36:46 +02:00
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 ) ;
2015-11-30 22:15:17 +01:00
nUDGyroSensitivity . Value = GyroSensitivity [ device ] ;
2017-06-24 11:52:39 +02:00
gyroTriggerBehavior . Checked = GyroTriggerTurns [ device ] ;
nUDGyroMouseVertScale . Value = GyroSensVerticalScale [ device ] ;
2015-11-30 22:15:17 +01:00
int invert = GyroInvert [ device ] ;
2017-07-14 14:46:45 +02:00
cBGyroInvertX . Checked = ( invert & 0x02 ) = = 2 ;
cBGyroInvertY . Checked = ( invert & 0x01 ) = = 1 ;
2015-11-30 22:15:17 +01:00
if ( s . Count > 0 )
btnGyroTriggers . Text = string . Join ( ", " , s ) ;
2017-06-29 06:42:16 +02:00
cBGyroSmooth . Checked = nUDGyroSmoothWeight . Enabled = GyroSmoothing [ device ] ;
nUDGyroSmoothWeight . Value = ( decimal ) ( GyroSmoothingWeight [ device ] ) ;
2017-07-14 14:46:45 +02:00
cBGyroMouseXAxis . SelectedIndex = GyroMouseHorizontalAxis [ device ] ;
2018-09-30 04:54:25 +02:00
triggerCondAndCombo . SelectedIndex = SATriggerCond [ device ] ? 0 : 1 ;
2019-01-31 17:59:00 +01:00
gyroMouseDzNUD . Value = GyroMouseDeadZone [ device ] ;
2019-02-07 04:42:34 +01:00
toggleGyroMCb . Checked = GyroMouseToggle [ device ] ;
2018-12-06 23:09:09 +01:00
2019-02-19 10:10:16 +01:00
cBSteeringWheelEmulationAxis . SelectedIndex = ( int ) GetSASteeringWheelEmulationAxis ( device ) ;
2018-12-06 23:09:09 +01:00
2019-02-19 10:10:16 +01:00
int idxSASteeringWheelEmulationRange = cBSteeringWheelEmulationRange . Items . IndexOf ( GetSASteeringWheelEmulationRange ( device ) . ToString ( ) ) ;
2018-12-06 23:09:09 +01:00
if ( idxSASteeringWheelEmulationRange > = 0 ) cBSteeringWheelEmulationRange . SelectedIndex = idxSASteeringWheelEmulationRange ;
2019-04-18 08:12:10 +02:00
OutContType tempOutType = Global . OutContType [ device ] ;
2019-10-24 23:49:20 +02:00
//Global.outDevTypeTemp[device] = tempOutType;
//devOutContType = tempOutType;
2019-04-18 08:12:10 +02:00
switch ( tempOutType )
{
2019-04-19 05:56:18 +02:00
case OutContType . DS4 :
OutContTypeCb . SelectedIndex = 1 ;
defaults = ds4Defaults ;
break ;
2019-05-03 03:18:59 +02:00
case OutContType . X360 :
default :
OutContTypeCb . SelectedIndex = 0 ;
defaults = xboxDefaults ;
break ;
2019-04-18 08:12:10 +02:00
}
2019-08-23 05:03:03 +02:00
gyroMStickTrigBehaveCk . Checked = GyroMouseStickTriggerTurns [ device ] ;
gyroMouseStickEvalCombo . SelectedIndex = SAMouseStickTriggerCond [ device ] ? 0 : 1 ;
GyroMouseStickInfo gyroMouseStickInfo = GyroMouseStickInf [ device ] ;
gyroMouseStickDZ . Value = gyroMouseStickInfo . deadZone ;
gyroMouseStickMaxZ . Value = gyroMouseStickInfo . maxZone ;
gyroMouseStickAntiDeadX . Value = ( decimal ) gyroMouseStickInfo . antiDeadX ;
gyroMouseStickAntiDeadY . Value = ( decimal ) gyroMouseStickInfo . antiDeadY ;
gyroMousestickXAxisCom . SelectedIndex = GyroMouseStickHorizontalAxis [ device ] ;
gyroMouseStickInvertXCk . Checked = ( gyroMouseStickInfo . inverted & 1 ) = = 1 ;
gyroMouseStickInvertYCk . Checked = ( gyroMouseStickInfo . inverted & 2 ) = = 2 ;
2019-08-26 12:51:54 +02:00
gyroMStickToggleCk . Checked = GyroMouseStickToggle [ device ] ;
2019-08-27 01:53:28 +02:00
gyroMStickVertScaleNUD . Value = gyroMouseStickInfo . vertScale ;
2019-08-27 05:15:38 +02:00
gyroMStickUseSmoothCk . Checked = gyroMouseStickInfo . useSmoothing ;
gyroMStickSmoothWeightNUD . Enabled = gyroMouseStickInfo . useSmoothing ;
gyroMStickSmoothWeightNUD . Value = ( decimal ) gyroMouseStickInfo . smoothWeight ;
2015-11-30 22:15:17 +01:00
}
else
{
cBFlashType . SelectedIndex = 0 ;
cBWhileCharging . SelectedIndex = 0 ;
2017-07-18 00:50:18 +02:00
btPollRateComboBox . SelectedIndex = 4 ;
2017-06-08 09:37:04 +02:00
lsOutCurveComboBox . SelectedIndex = 0 ;
rsOutCurveComboBox . SelectedIndex = 0 ;
2017-07-19 22:15:59 +02:00
cBL2OutputCurve . SelectedIndex = 0 ;
cBR2OutputCurve . SelectedIndex = 0 ;
2017-07-20 01:17:11 +02:00
cBSixaxisXOutputCurve . SelectedIndex = 0 ;
cBSixaxisZOutputCurve . SelectedIndex = 0 ;
2019-07-25 21:54:39 +02:00
2019-09-08 00:11:10 +02:00
tBLSCustomOutputCurve . Text = String . Empty ;
2019-09-03 14:21:53 +02:00
tBRSCustomOutputCurve . Text = String . Empty ;
tBL2CustomOutputCurve . Text = String . Empty ;
tBR2CustomOutputCurve . Text = String . Empty ;
tBSixXCustomOutputCurve . Text = String . Empty ;
tBSixZCustomOutputCurve . Text = String . Empty ;
2019-09-08 00:11:10 +02:00
CustomCurveChecker ( ) ;
2019-07-25 21:54:39 +02:00
2015-11-30 22:15:17 +01:00
rBTPMouse . Checked = true ;
2019-08-23 05:03:03 +02:00
//rBSAControls.Checked = true;
2015-11-30 22:15:17 +01:00
ToggleRainbow ( false ) ;
2015-12-05 09:55:11 +01:00
cBDinput . Checked = false ;
cbStartTouchpadOff . Checked = false ;
2019-08-23 05:03:03 +02:00
//rBSAControls.Checked = true;
2015-12-05 09:55:11 +01:00
rBTPMouse . Checked = true ;
2017-06-24 11:52:39 +02:00
2015-11-30 22:15:17 +01:00
switch ( device )
{
2015-12-05 09:55:11 +01:00
case 0 : tBRedBar . Value = 0 ; tBGreenBar . Value = 0 ; tBBlueBar . Value = 255 ; break ;
case 1 : tBRedBar . Value = 255 ; tBGreenBar . Value = 0 ; tBBlueBar . Value = 0 ; break ;
case 2 : tBRedBar . Value = 0 ; tBGreenBar . Value = 255 ; tBBlueBar . Value = 0 ; break ;
case 3 : tBRedBar . Value = 255 ; tBGreenBar . Value = 0 ; tBBlueBar . Value = 255 ; break ;
case 4 : tBRedBar . Value = 255 ; tBGreenBar . Value = 255 ; tBBlueBar . Value = 255 ; break ;
2015-11-30 22:15:17 +01:00
}
2017-04-26 23:51:15 +02:00
2015-12-05 09:55:11 +01:00
tBLowBlueBar . Value = 0 ; tBLowGreenBar . Value = 0 ; tBLowBlueBar . Value = 0 ;
cBLightbyBattery . Checked = false ;
nUDflashLED . Value = 0 ;
lbFull . Text = ( cBLightbyBattery . Checked ? "Full:" : "Color:" ) ;
cBFlashType . SelectedIndex = 0 ;
nUDRumbleBoost . Value = 100 ;
nUDTouch . Value = 100 ;
cBSlide . Checked = true ;
nUDScroll . Value = 0 ;
cBScroll . Checked = false ;
nUDTap . Value = 0 ;
cBTap . Checked = false ;
cBDoubleTap . Checked = false ;
2017-09-21 04:44:31 +02:00
cBTouchpadJitterCompensation . Checked = true ;
2017-07-13 05:39:46 +02:00
touchpadInvertComboBox . SelectedIndex = 0 ;
2015-12-05 09:55:11 +01:00
cBlowerRCOn . Checked = false ;
2017-03-19 09:29:45 +01:00
cBFlushHIDQueue . Checked = false ;
2017-04-26 23:51:15 +02:00
enableTouchToggleCheckbox . Checked = true ;
2015-12-05 09:55:11 +01:00
nUDIdleDisconnect . Value = 5 ;
cBIdleDisconnect . Checked = true ;
numUDMouseSens . Value = 25 ;
2019-03-17 07:28:16 +01:00
cBMouseAccel . Checked = false ;
2015-12-05 09:55:11 +01:00
pBHoveredButton . Image = null ;
nUDRainbow . Value = 0 ;
2019-09-06 17:50:20 +02:00
maxRainSatTB . Value = 100 ;
2015-12-05 09:55:11 +01:00
nUDL2 . Value = 0 ;
nUDR2 . Value = 0 ;
2017-05-05 18:13:12 +02:00
nUDL2Maxzone . Value = 1 ;
nUDR2Maxzone . Value = 1 ;
2019-08-30 20:32:56 +02:00
nUDLS . Value = 0.08 m ;
nUDRS . Value = 0.08 m ;
nUDLSAntiDead . Value = 0.20 m ;
nUDRSAntiDead . Value = 0.20 m ;
2017-05-05 18:13:12 +02:00
nUDLSMaxZone . Value = 1 ;
nUDRSMaxZone . Value = 1 ;
2017-06-30 10:42:19 +02:00
nUDLSRotation . Value = 0 ;
nUDRSRotation . Value = 0 ;
2019-04-21 07:13:09 +02:00
nUDSX . Value = 0.25 m ;
nUDSZ . Value = 0.25 m ;
2017-07-19 00:28:16 +02:00
nUDSixAxisXMaxZone . Value = 1.0 m ;
nUDSixAxisZMaxZone . Value = 1.0 m ;
2017-07-19 02:44:55 +02:00
nUDSixaxisXAntiDead . Value = 0.0 m ;
nUDSixaxisZAntiDead . Value = 0.0 m ;
2015-12-05 09:55:11 +01:00
nUDL2S . Value = 1 ;
nUDR2S . Value = 1 ;
nUDLSS . Value = 1 ;
nUDRSS . Value = 1 ;
nUDSXS . Value = 1 ;
nUDSZS . Value = 1 ;
2019-03-05 00:21:58 +01:00
lsSquStickCk . Checked = false ;
rsSquStickCk . Checked = false ;
2019-08-25 22:48:26 +02:00
RoundnessNUpDown . Value = 5.0 m ;
2019-09-14 05:26:58 +02:00
RoundnessRsNUD . Value = 5.0 m ;
2019-03-05 00:21:58 +01:00
2015-12-05 09:55:11 +01:00
cBLaunchProgram . Checked = false ;
pBProgram . Image = null ;
btnBrowse . Text = Properties . Resources . Browse ;
cBDinput . Checked = false ;
olddinputcheck = false ;
cbStartTouchpadOff . Checked = false ;
nUDLSCurve . Value = 0 ;
nUDRSCurve . Value = 0 ;
cBControllerInput . Checked = DS4Mapping ;
2018-01-01 19:21:35 +01:00
trackballCk . Checked = false ;
trackFrictionNUD . Value = 10.0 m ;
if ( device < 4 )
{
Program . rootHub . touchPad [ device ] ? . ResetTrackAccel ( 10.0 ) ;
}
2017-08-05 05:36:46 +02:00
2019-08-24 04:39:22 +02:00
ResetGyroTriggers ( true ) ;
2015-12-13 22:30:54 +01:00
( ( ToolStripMenuItem ) cMGyroTriggers . Items [ cMGyroTriggers . Items . Count - 1 ] ) . Checked = true ;
2017-08-05 05:36:46 +02:00
for ( int i = 0 , arlen = cMTouchDisableInvert . Items . Count ; i < arlen ; i + + )
{
( ( ToolStripMenuItem ) cMTouchDisableInvert . Items [ i ] ) . Checked = false ;
}
2015-12-05 09:55:11 +01:00
nUDGyroSensitivity . Value = 100 ;
2017-06-24 11:52:39 +02:00
nUDGyroMouseVertScale . Value = 100 ;
gyroTriggerBehavior . Checked = true ;
2015-12-05 09:55:11 +01:00
cBGyroInvertX . Checked = false ;
cBGyroInvertY . Checked = false ;
2017-06-29 06:42:16 +02:00
cBGyroSmooth . Checked = false ;
nUDGyroSmoothWeight . Value = 0.5 m ;
2019-01-31 17:59:00 +01:00
gyroMouseDzNUD . Value = MouseCursor . GYRO_MOUSE_DEADZONE ;
2019-02-07 04:42:34 +01:00
toggleGyroMCb . Checked = false ;
2017-07-14 14:46:45 +02:00
cBGyroMouseXAxis . SelectedIndex = 0 ;
2018-09-30 04:54:25 +02:00
triggerCondAndCombo . SelectedIndex = 0 ;
2018-12-06 23:09:09 +01:00
cBSteeringWheelEmulationAxis . SelectedIndex = 0 ;
cBSteeringWheelEmulationRange . SelectedIndex = cBSteeringWheelEmulationRange . Items . IndexOf ( "360" ) ;
2019-04-18 08:12:10 +02:00
OutContTypeCb . SelectedIndex = 0 ;
2019-08-23 05:03:03 +02:00
gyroOutputMode . SelectedIndex = 0 ;
2019-08-25 22:41:13 +02:00
pnlSAMouse . Visible = false ;
fLPTiltControls . Visible = true ;
gyroMouseJoyFLP . Visible = false ;
2019-08-24 05:08:15 +02:00
gyroMStickTrigBehaveCk . Checked = true ;
2019-08-23 05:03:03 +02:00
gyroMouseStickEvalCombo . SelectedIndex = 0 ;
2019-08-24 05:08:15 +02:00
gyroMouseStickDZ . Value = 30 ;
2019-08-26 11:12:02 +02:00
gyroMouseStickMaxZ . Value = 830 ;
2019-08-24 05:08:15 +02:00
gyroMouseStickAntiDeadX . Value = 0.4 m ;
gyroMouseStickAntiDeadY . Value = 0.4 m ;
2019-08-23 05:03:03 +02:00
gyroMousestickXAxisCom . SelectedIndex = 0 ;
gyroMouseStickInvertXCk . Checked = false ;
gyroMouseStickInvertYCk . Checked = false ;
2019-08-26 12:51:54 +02:00
gyroMStickTrigBehaveCk . Checked = false ;
gyroMStickToggleCk . Checked = false ;
2019-08-27 01:53:28 +02:00
gyroMStickVertScaleNUD . Value = 100 ;
2019-08-27 05:15:38 +02:00
gyroMStickUseSmoothCk . Checked = false ;
gyroMStickSmoothWeightNUD . Enabled = false ;
gyroMStickSmoothWeightNUD . Value = 0.5 m ;
2019-10-10 10:28:46 +02:00
Global . outDevTypeTemp [ device ] = OutContType . X360 ;
2019-08-23 05:03:03 +02:00
2015-12-05 09:55:11 +01:00
Set ( ) ;
2015-11-30 22:15:17 +01:00
}
2015-12-18 07:25:51 +01:00
2015-11-30 22:15:17 +01:00
UpdateLists ( ) ;
LoadActions ( string . IsNullOrEmpty ( filename ) ) ;
2017-05-20 12:38:12 +02:00
lVActions . ItemCheck + = new ItemCheckEventHandler ( this . lVActions_ItemCheck ) ;
2015-11-30 22:15:17 +01:00
loading = false ;
2015-12-18 07:25:51 +01:00
saving = false ;
}
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
public void LoadActions ( bool newp )
2014-12-13 21:12:03 +01:00
{
2015-11-30 22:15:17 +01:00
lVActions . Items . Clear ( ) ;
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
List < string > pactions = ProfileActions [ device ] ;
foreach ( SpecialAction action in GetActions ( ) )
2014-12-13 21:12:03 +01:00
{
ListViewItem lvi = new ListViewItem ( action . name ) ;
lvi . SubItems . Add ( action . controls . Replace ( "/" , ", " ) ) ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
//string type = action.type;
switch ( action . type )
2014-12-13 21:12:03 +01:00
{
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
case "Macro" : lvi . SubItems . Add ( Properties . Resources . Macro + ( action . keyType . HasFlag ( DS4KeyType . ScanCode ) ? " (" + Properties . Resources . ScanCode + ")" : "" ) ) ; break ;
2014-12-13 21:12:03 +01:00
case "Program" : lvi . SubItems . Add ( Properties . Resources . LaunchProgram . Replace ( "*program*" , Path . GetFileNameWithoutExtension ( action . details ) ) ) ; break ;
case "Profile" : lvi . SubItems . Add ( Properties . Resources . LoadProfile . Replace ( "*profile*" , action . details ) ) ; break ;
2017-07-14 14:46:45 +02:00
case "Key" : lvi . SubItems . Add ( ( ( Keys ) Convert . ToInt32 ( action . details ) ) . ToString ( ) + ( action . uTrigger . Count > 0 ? " (Toggle)" : "" ) ) ; break ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
case "DisconnectBT" :
2015-02-12 20:36:40 +01:00
lvi . SubItems . Add ( Properties . Resources . DisconnectBT ) ;
break ;
case "BatteryCheck" :
lvi . SubItems . Add ( Properties . Resources . CheckBattery ) ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
break ;
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
case "XboxGameDVR" :
lvi . SubItems . Add ( "Xbox Game DVR" ) ;
break ;
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
case "MultiAction" :
lvi . SubItems . Add ( Properties . Resources . MultiAction ) ;
break ;
2018-12-03 23:50:37 +01:00
case "SASteeringWheelEmulationCalibrate" :
lvi . SubItems . Add ( Properties . Resources . SASteeringWheelEmulationCalibrate ) ;
break ;
2014-12-13 21:12:03 +01:00
}
2017-04-26 23:51:15 +02:00
2015-12-05 09:55:11 +01:00
if ( newp )
2017-04-26 23:51:15 +02:00
{
2015-12-05 09:55:11 +01:00
if ( action . type = = "DisconnectBT" )
2014-12-13 21:12:03 +01:00
lvi . Checked = true ;
2015-12-05 09:55:11 +01:00
else
lvi . Checked = false ;
2017-04-26 23:51:15 +02:00
}
2015-12-05 09:55:11 +01:00
else
2017-04-26 23:51:15 +02:00
{
2015-12-05 09:55:11 +01:00
foreach ( string s in pactions )
2017-04-26 23:51:15 +02:00
{
2015-12-05 09:55:11 +01:00
if ( s = = action . name )
{
lvi . Checked = true ;
break ;
}
2017-04-26 23:51:15 +02:00
}
}
2014-12-13 21:12:03 +01:00
lVActions . Items . Add ( lvi ) ;
}
2014-05-19 07:55:12 +02:00
}
2014-12-13 21:12:03 +01:00
2017-07-14 14:46:45 +02:00
private void EnableReadings ( bool on )
2015-12-05 09:55:11 +01:00
{
lbL2Track . Enabled = on ;
lbR2Track . Enabled = on ;
pnlLSTrack . Enabled = on ;
pnlRSTrack . Enabled = on ;
pnlSATrack . Enabled = on ;
btnLSTrack . Visible = on ;
btnLSTrackS . Visible = on ;
btnRSTrack . Visible = on ;
btnRSTrackS . Visible = on ;
btnSATrack . Visible = on ;
btnSATrackS . Visible = on ;
}
2017-04-26 23:51:15 +02:00
2019-08-24 04:39:22 +02:00
private void ResetGyroTriggers ( bool loadstate = false )
2019-08-23 05:03:03 +02:00
{
loading = true ;
for ( int i = 0 , arlen = cMGyroTriggers . Items . Count ; i < arlen ; i + + )
{
( ( ToolStripMenuItem ) cMGyroTriggers . Items [ i ] ) . Checked = false ;
}
2019-08-24 04:39:22 +02:00
loading = loadstate ;
2019-08-23 05:03:03 +02:00
}
private string GetGyroTriggerActionString ( ref string [ ] satriggers )
{
List < string > s = new List < string > ( ) ;
int gyroTriggerCount = cMGyroTriggers . Items . Count ;
for ( int i = 0 , satrigLen = satriggers . Length ; i < satrigLen ; i + + )
{
int tr = 0 ;
if ( int . TryParse ( satriggers [ i ] , out tr ) )
{
if ( tr < gyroTriggerCount & & tr > - 1 )
{
s . Add ( cMGyroTriggers . Items [ tr ] . Text ) ;
}
else
{
s . Add ( cMGyroTriggers . Items [ gyroTriggerCount - 1 ] . Text ) ;
break ;
}
}
else
{
s . Add ( cMGyroTriggers . Items [ gyroTriggerCount - 1 ] . Text ) ;
break ;
}
}
string result = string . Join ( ", " , s ) ;
return result ;
}
2019-08-24 04:39:22 +02:00
private void MarkCurrentGyroTriggers ( ref string [ ] satriggers , bool loadstate = false )
2019-08-23 05:03:03 +02:00
{
loading = true ;
int gyroTriggerCount = cMGyroTriggers . Items . Count ;
( ( ToolStripMenuItem ) cMGyroTriggers . Items [ gyroTriggerCount - 1 ] ) . Checked = false ;
for ( int i = 0 , satrigLen = satriggers . Length ; i < satrigLen ; i + + )
{
int tr = 0 ;
if ( int . TryParse ( satriggers [ i ] , out tr ) )
{
if ( tr < gyroTriggerCount & & tr > - 1 )
{
( ( ToolStripMenuItem ) cMGyroTriggers . Items [ tr ] ) . Checked = true ;
}
else
{
( ( ToolStripMenuItem ) cMGyroTriggers . Items [ gyroTriggerCount - 1 ] ) . Checked = true ;
break ;
}
}
else
{
( ( ToolStripMenuItem ) cMGyroTriggers . Items [ gyroTriggerCount - 1 ] ) . Checked = true ;
break ;
}
}
2019-08-24 04:39:22 +02:00
loading = loadstate ;
2019-08-23 05:03:03 +02:00
}
2017-07-14 14:46:45 +02:00
private void ControllerReadout_Tick ( object sender , EventArgs e )
2015-12-05 09:55:11 +01:00
{
2014-05-30 22:39:39 +02:00
// MEMS gyro data is all calibrated to roughly -1G..1G for values -0x2000..0x1fff
// Enough additional acceleration and we are no longer mostly measuring Earth's gravity...
// We should try to indicate setpoints of the calibration when exposing this measurement....
2017-05-20 06:59:47 +02:00
int tempDeviceNum = ( int ) nUDSixaxis . Value - 1 ;
DS4Device ds = Program . rootHub . DS4Controllers [ tempDeviceNum ] ;
2017-07-14 14:46:45 +02:00
2017-04-07 17:59:15 +02:00
if ( ds = = null )
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
{
2015-12-05 09:55:11 +01:00
EnableReadings ( false ) ;
2015-02-08 22:51:52 +01:00
lbInputDelay . Text = Properties . Resources . InputDelay . Replace ( "*number*" , Properties . Resources . NA ) ;
2015-12-18 07:25:51 +01:00
lbInputDelay . BackColor = Color . Transparent ;
2017-12-01 09:35:35 +01:00
lbInputDelay . ForeColor = SystemColors . ControlText ;
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
}
else
{
2015-12-05 09:55:11 +01:00
EnableReadings ( true ) ;
2017-05-20 06:59:47 +02:00
2017-07-14 14:46:45 +02:00
DS4StateExposed exposeState = Program . rootHub . ExposedState [ tempDeviceNum ] ;
DS4State baseState = Program . rootHub . getDS4State ( tempDeviceNum ) ;
2019-03-07 08:06:55 +01:00
DS4State interState = Program . rootHub . getDS4StateTemp ( tempDeviceNum ) ;
2017-07-14 14:46:45 +02:00
2017-07-18 22:37:01 +02:00
SetDynamicTrackBarValue ( tBsixaxisGyroX , ( exposeState . getGyroYaw ( ) + tBsixaxisGyroX . Value * 2 ) / 3 ) ;
SetDynamicTrackBarValue ( tBsixaxisGyroY , ( exposeState . getGyroPitch ( ) + tBsixaxisGyroY . Value * 2 ) / 3 ) ;
SetDynamicTrackBarValue ( tBsixaxisGyroZ , ( exposeState . getGyroRoll ( ) + tBsixaxisGyroZ . Value * 2 ) / 3 ) ;
SetDynamicTrackBarValue ( tBsixaxisAccelX , ( exposeState . getAccelX ( ) + tBsixaxisAccelX . Value * 2 ) / 3 ) ;
SetDynamicTrackBarValue ( tBsixaxisAccelY , ( exposeState . getAccelY ( ) + tBsixaxisAccelY . Value * 2 ) / 3 ) ;
SetDynamicTrackBarValue ( tBsixaxisAccelZ , ( exposeState . getAccelZ ( ) + tBsixaxisAccelZ . Value * 2 ) / 3 ) ;
2017-07-14 14:46:45 +02:00
int x = baseState . LX ;
int y = baseState . LY ;
2017-05-20 06:59:47 +02:00
2019-03-07 08:06:55 +01:00
btnLSTrack . Location = new Point ( ( int ) ( dpix * x / 2.09 ) ,
( int ) ( dpiy * y / 2.09 ) ) ;
bool mappedLS = interState . LX ! = x | | interState . LY ! = y ;
btnLSTrackS . Visible = mappedLS ;
2017-04-26 23:51:15 +02:00
2019-03-07 08:06:55 +01:00
if ( mappedLS )
2017-04-26 23:51:15 +02:00
{
2019-03-07 08:06:55 +01:00
btnLSTrackS . Location = new Point ( ( int ) ( dpix * interState . LX / 2.09 ) , ( int ) ( dpiy * interState . LY / 2.09 ) ) ;
2017-04-26 23:51:15 +02:00
}
2017-07-14 14:46:45 +02:00
x = baseState . RX ;
y = baseState . RY ;
2015-12-05 09:55:11 +01:00
2019-03-07 08:06:55 +01:00
bool mappedRS = interState . RX ! = x | | interState . RY ! = y ;
btnRSTrackS . Visible = mappedRS ;
btnRSTrack . Location = new Point ( ( int ) ( dpix * x / 2.09 ) , ( int ) ( dpiy * y / 2.09 ) ) ;
if ( mappedRS )
2017-05-20 06:59:47 +02:00
{
2019-03-07 08:06:55 +01:00
btnRSTrackS . Location = new Point ( ( int ) ( dpix * interState . RX / 2.09 ) , ( int ) ( dpiy * interState . RY / 2.09 ) ) ;
2017-05-20 06:59:47 +02:00
}
2015-12-05 09:55:11 +01:00
2017-07-18 22:37:01 +02:00
x = exposeState . getAccelX ( ) + 127 ;
y = exposeState . getAccelZ ( ) + 127 ;
2019-03-07 08:06:55 +01:00
btnSATrack . Location = new Point ( ( int ) ( dpix * Global . Clamp ( 0 , x / 2.09 , pnlSATrack . Size . Width ) ) ,
( int ) ( dpiy * Global . Clamp ( 0 , y / 2.09 , pnlSATrack . Size . Height ) ) ) ;
2014-12-13 21:12:03 +01:00
2019-03-07 08:06:55 +01:00
bool mappedSix = interState . Motion . accelX ! = 0 | | interState . Motion . accelZ ! = 0 ;
btnSATrackS . Visible = mappedSix ;
if ( mappedSix )
2017-05-20 06:59:47 +02:00
{
2019-03-07 08:06:55 +01:00
btnSATrackS . Location = new Point ( ( int ) ( dpix * Global . Clamp ( 0 , ( interState . Motion . accelX + 127 ) / 2.09 , pnlSATrack . Size . Width ) ) ,
( int ) ( dpiy * Global . Clamp ( 0 , ( interState . Motion . accelZ + 127 ) / 2.09 , pnlSATrack . Size . Height ) ) ) ;
2017-05-20 06:59:47 +02:00
}
2017-07-14 14:46:45 +02:00
tBL2 . Value = baseState . L2 ;
2019-03-07 08:06:55 +01:00
lbL2Track . Location = new Point ( tBL2 . Location . X - ( int ) ( dpix * 25 ) ,
( int ) ( tBL2 . Location . Y + tBL2 . Size . Height - interState . L2 / ( tBL2 . Size . Height * . 0209f / Math . Pow ( dpix , 2.0 ) ) - ( dpix * 20 ) ) ) ;
//lbL2Track.Location = new Point(tBL2.Location.X - (int)(dpix * 25),
// Math.Max((int)(((tBL2.Location.Y + tBL2.Size.Height) - (tBL2.Value * tempL2S) / (tBL2.Size.Height * .0209f / Math.Pow(dpix, 2))) - dpix * 20),
// (int)(1 * ((tBL2.Location.Y + tBL2.Size.Height) - 255 / (tBL2.Size.Height * .0209f / Math.Pow(dpix, 2))) - dpix * 20)));
2017-04-26 23:51:15 +02:00
2019-03-07 08:06:55 +01:00
if ( interState . L2 > = 255 )
2014-07-26 01:17:45 +02:00
lbL2Track . ForeColor = Color . Green ;
2019-03-07 08:06:55 +01:00
else if ( interState . L2 = = 0 )
2014-07-26 01:17:45 +02:00
lbL2Track . ForeColor = Color . Red ;
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
else
2014-07-26 01:17:45 +02:00
lbL2Track . ForeColor = Color . Black ;
2014-12-13 21:12:03 +01:00
2017-07-14 14:46:45 +02:00
tBR2 . Value = baseState . R2 ;
2015-12-05 09:55:11 +01:00
lbR2Track . Location = new Point ( tBR2 . Location . X + ( int ) ( dpix * 25 ) ,
2019-03-07 08:06:55 +01:00
( int ) ( tBR2 . Location . Y + tBR2 . Size . Height - interState . R2 / ( tBR2 . Size . Height * . 0209f / Math . Pow ( dpix , 2.0 ) ) - ( dpix * 20 ) ) ) ;
//lbR2Track.Location = new Point(tBR2.Location.X + (int)(dpix * 25),
// Math.Max((int)(1 * ((tBR2.Location.Y + tBR2.Size.Height) - (tBR2.Value * tempR2S) / (tBR2.Size.Height * .0209f / Math.Pow(dpix, 2))) - dpix * 20),
// (int)(1 * ((tBR2.Location.Y + tBR2.Size.Height) - 255 / (tBR2.Size.Height * .0209f / Math.Pow(dpix, 2))) - dpix * 20)));
2017-04-26 23:51:15 +02:00
2019-03-07 08:06:55 +01:00
if ( interState . R2 > = 255 )
2014-07-26 01:17:45 +02:00
lbR2Track . ForeColor = Color . Green ;
2019-03-07 08:06:55 +01:00
else if ( interState . R2 = = 0 )
2014-07-26 01:17:45 +02:00
lbR2Track . ForeColor = Color . Red ;
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
else
2014-07-26 01:17:45 +02:00
lbR2Track . ForeColor = Color . Black ;
2014-12-13 21:12:03 +01:00
2017-04-07 17:59:15 +02:00
double latency = ds . Latency ;
int warnInterval = ds . getWarnInterval ( ) ;
2019-03-07 08:06:55 +01:00
lbInputDelay . Text = Properties . Resources . InputDelay . Replace ( "*number*" ,
latency . ToString ( ) ) ;
2017-04-07 17:59:15 +02:00
if ( latency > warnInterval )
2015-12-18 07:25:51 +01:00
{
lbInputDelay . BackColor = Color . Red ;
lbInputDelay . ForeColor = Color . White ;
}
2017-07-14 14:46:45 +02:00
else if ( latency > ( warnInterval * 0.5 ) )
2015-12-18 07:25:51 +01:00
{
lbInputDelay . BackColor = Color . Yellow ;
lbInputDelay . ForeColor = Color . Black ;
}
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
else
2015-12-18 07:25:51 +01:00
{
lbInputDelay . BackColor = Color . Transparent ;
2017-12-01 09:35:35 +01:00
lbInputDelay . ForeColor = SystemColors . ControlText ;
2015-12-18 07:25:51 +01:00
}
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
}
2014-05-30 22:39:39 +02:00
}
2014-12-13 21:12:03 +01:00
double TValue ( double value1 , double value2 , double percent )
{
percent / = 100f ;
return value1 * percent + value2 * ( 1 - percent ) ;
}
2017-04-26 23:51:15 +02:00
2014-05-19 07:55:12 +02:00
private void InputDS4 ( object sender , EventArgs e )
{
2015-12-18 07:25:51 +01:00
if ( Form . ActiveForm = = root & & cBControllerInput . Checked & & tCControls . SelectedIndex < 1 )
2017-04-26 23:51:15 +02:00
{
2017-05-20 06:59:47 +02:00
int tempDeviceNum = ( int ) nUDSixaxis . Value - 1 ;
2017-08-23 02:52:32 +02:00
switch ( Program . rootHub . GetActiveInputControl ( tempDeviceNum ) )
{
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 ;
2017-05-02 17:00:54 +02:00
default : break ;
2014-05-19 07:55:12 +02:00
}
2017-04-26 23:51:15 +02:00
}
2014-03-28 02:50:40 +01:00
}
2015-11-28 06:47:26 +01:00
private void button_MouseHoverB ( object sender , EventArgs e )
{
Control [ ] b = Controls . Find ( ( ( Button ) sender ) . Name . Remove ( 1 , 1 ) , true ) ;
if ( b ! = null & & b . Length = = 1 )
button_MouseHover ( b [ 0 ] , e ) ;
}
2015-12-18 07:25:51 +01:00
private string ShiftTrigger ( int trigger )
{
switch ( trigger )
{
case 1 : return "Cross" ;
case 2 : return "Circle" ;
case 3 : return "Square" ;
case 4 : return "Triangle" ;
case 5 : return "Options" ;
case 6 : return "Share" ;
case 7 : return "Dpad Up" ;
case 8 : return "Dpad Down" ;
case 9 : return "Dpad Left" ;
case 10 : return "Dpad Right" ;
case 11 : return "PS" ;
case 12 : return "L1" ;
case 13 : return "R1" ;
case 14 : return "L2" ;
case 15 : return "R2" ;
case 16 : return "L3" ;
case 17 : return "R3" ;
case 18 : return "Left Touch" ;
case 19 : return "Upper Touch" ;
case 20 : return "Multi Touch" ;
case 21 : return "Right Touch" ;
case 22 : return Properties . Resources . TiltUp ;
case 23 : return Properties . Resources . TiltDown ;
case 24 : return Properties . Resources . TiltLeft ;
case 25 : return Properties . Resources . TiltRight ;
case 26 : return fingerOnTouchpadToolStripMenuItem . Text ;
default : return "" ;
}
}
2014-05-14 09:12:15 +02:00
private void button_MouseHover ( object sender , EventArgs e )
{
2015-11-28 06:47:26 +01:00
bool swipesOn = lBControls . Items . Count > 33 ;
2017-05-05 10:28:45 +02:00
Button senderControl = ( Button ) sender ;
string name = senderControl . Name ;
2015-11-30 22:15:17 +01:00
if ( e ! = null )
2014-05-14 09:12:15 +02:00
{
2017-05-05 10:28:45 +02:00
int tempIndex = 0 ;
if ( hoverIndexDict . TryGetValue ( senderControl , out tempIndex ) )
{
lBControls . SelectedIndex = tempIndex ;
}
2015-11-30 22:15:17 +01:00
}
2017-04-26 23:51:15 +02:00
2015-12-18 07:25:51 +01:00
DS4ControlSettings dcs = getDS4CSetting ( device , name ) ;
if ( lBControls . SelectedIndex > = 0 )
{
string tipText = lBControls . SelectedItem . ToString ( ) . Split ( ':' ) [ 0 ] ;
tipText + = ": " ;
2017-05-05 10:28:45 +02:00
tipText + = UpdateButtonList ( senderControl ) ;
2015-12-18 07:25:51 +01:00
if ( GetDS4Action ( device , name , true ) ! = null & & GetDS4STrigger ( device , name ) > 0 )
{
tipText + = "\n Shift: " ;
2017-05-05 10:28:45 +02:00
tipText + = ShiftTrigger ( GetDS4STrigger ( device , name ) ) + " -> " + UpdateButtonList ( senderControl , true ) ;
2015-12-18 07:25:51 +01:00
}
2017-04-26 23:51:15 +02:00
2015-12-18 07:25:51 +01:00
lbControlName . Text = tipText ;
}
2017-04-26 23:51:15 +02:00
2017-05-05 10:28:45 +02:00
Bitmap tempBit = null ;
if ( hoverImageDict . TryGetValue ( senderControl , out tempBit ) )
{
pBHoveredButton . Image = tempBit ;
}
Label tempLabel = null ;
if ( hoverLabelDict . TryGetValue ( senderControl , out tempLabel ) )
{
pBHoveredButton . Location = tempLabel . Location ;
}
2015-11-28 06:47:26 +01:00
if ( pBHoveredButton . Image ! = null )
pBHoveredButton . Size = new Size ( ( int ) ( pBHoveredButton . Image . Size . Width * ( dpix / 1.25f ) ) , ( int ) ( pBHoveredButton . Image . Size . Height * ( dpix / 1.25f ) ) ) ;
2014-05-14 09:12:15 +02:00
}
2015-11-28 06:47:26 +01:00
private void button_MouseLeave ( object sender , EventArgs e )
{
pBHoveredButton . Image = null ;
pBHoveredButton . Location = new Point ( 0 , 0 ) ;
2015-11-30 22:15:17 +01:00
pBHoveredButton . Size = new Size ( 0 , 0 ) ;
2015-11-28 06:47:26 +01:00
}
2014-03-28 02:50:40 +01:00
private void SetDynamicTrackBarValue ( TrackBar trackBar , int value )
{
if ( trackBar . Maximum < value )
trackBar . Maximum = value ;
else if ( trackBar . Minimum > value )
trackBar . Minimum = value ;
2017-04-26 23:51:15 +02:00
2014-03-28 02:50:40 +01:00
trackBar . Value = value ;
}
2014-06-02 19:29:38 +02:00
public void Set ( )
2014-05-12 07:48:50 +02:00
{
2014-11-01 22:49:22 +01:00
pnlLowBattery . Visible = cBLightbyBattery . Checked ;
2014-08-17 00:09:15 +02:00
lbFull . Text = ( cBLightbyBattery . Checked ? Properties . Resources . Full + ":" : Properties . Resources . Color + ":" ) ;
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
MainColor [ device ] = new DS4Color ( ( byte ) tBRedBar . Value , ( byte ) tBGreenBar . Value , ( byte ) tBBlueBar . Value ) ;
LowColor [ device ] = new DS4Color ( ( byte ) tBLowRedBar . Value , ( byte ) tBLowGreenBar . Value , ( byte ) tBLowBlueBar . Value ) ;
ChargingColor [ device ] = new DS4Color ( btnChargingColor . BackColor ) ;
FlashType [ device ] = ( byte ) cBFlashType . SelectedIndex ;
2015-11-28 06:47:26 +01:00
if ( btnFlashColor . BackColor ! = main )
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
FlashColor [ device ] = new DS4Color ( btnFlashColor . BackColor ) ;
2015-02-08 22:51:52 +01:00
else
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
FlashColor [ device ] = new DS4Color ( Color . Black ) ;
2017-04-26 23:51:15 +02:00
2017-05-17 08:02:12 +02:00
BTPollRate [ device ] = btPollRateComboBox . SelectedIndex ;
2019-07-06 23:47:54 +02:00
setLsOutCurveMode ( device , lsOutCurveComboBox . SelectedIndex ) ;
setRsOutCurveMode ( device , rsOutCurveComboBox . SelectedIndex ) ;
setL2OutCurveMode ( device , cBL2OutputCurve . SelectedIndex ) ;
setR2OutCurveMode ( device , cBR2OutputCurve . SelectedIndex ) ;
setSXOutCurveMode ( device , cBSixaxisXOutputCurve . SelectedIndex ) ;
setSZOutCurveMode ( device , cBSixaxisZOutputCurve . SelectedIndex ) ;
2019-07-01 03:59:51 +02:00
L2ModInfo [ device ] . deadZone = ( byte ) Math . Round ( ( nUDL2 . Value * 255 ) , 0 ) ;
R2ModInfo [ device ] . deadZone = ( byte ) Math . Round ( ( nUDR2 . Value * 255 ) , 0 ) ;
L2ModInfo [ device ] . antiDeadZone = ( int ) ( nUDL2AntiDead . Value * 100 ) ;
R2ModInfo [ device ] . antiDeadZone = ( int ) ( nUDR2AntiDead . Value * 100 ) ;
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
RumbleBoost [ device ] = ( byte ) nUDRumbleBoost . Value ;
TouchSensitivity [ device ] = ( byte ) nUDTouch . Value ;
TouchpadJitterCompensation [ device ] = cBTouchpadJitterCompensation . Checked ;
LowerRCOn [ device ] = cBlowerRCOn . Checked ;
2015-11-30 22:15:17 +01:00
ScrollSensitivity [ device ] = ( int ) nUDScroll . Value ;
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
DoubleTap [ device ] = cBDoubleTap . Checked ;
TapSensitivity [ device ] = ( byte ) nUDTap . Value ;
2017-07-13 05:39:46 +02:00
tempInt = touchpadInvertComboBox . SelectedIndex ;
TouchpadInvert [ device ] = touchpadInvertToValue [ tempInt ] ;
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
IdleDisconnectTimeout [ device ] = ( int ) ( nUDIdleDisconnect . Value * 60 ) ;
Rainbow [ device ] = ( int ) nUDRainbow . Value ;
2019-09-06 17:50:20 +02:00
MaxSatRainbow [ device ] = maxRainSatTB . Value / 100.0 ;
2019-06-30 07:40:24 +02:00
RSModInfo [ device ] . deadZone = ( int ) Math . Round ( ( nUDRS . Value * 127 ) , 0 ) ;
LSModInfo [ device ] . deadZone = ( int ) Math . Round ( ( nUDLS . Value * 127 ) , 0 ) ;
LSModInfo [ device ] . antiDeadZone = ( int ) ( nUDLSAntiDead . Value * 100 ) ;
RSModInfo [ device ] . antiDeadZone = ( int ) ( nUDRSAntiDead . Value * 100 ) ;
LSModInfo [ device ] . maxZone = ( int ) ( nUDLSMaxZone . Value * 100 ) ;
RSModInfo [ device ] . maxZone = ( int ) ( nUDRSMaxZone . Value * 100 ) ;
2017-06-30 10:42:19 +02:00
LSRotation [ device ] = ( double ) nUDLSRotation . Value * Math . PI / 180.0 ;
RSRotation [ device ] = ( double ) nUDRSRotation . Value * Math . PI / 180.0 ;
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
ButtonMouseSensitivity [ device ] = ( int ) numUDMouseSens . Value ;
FlashAt [ device ] = ( int ) nUDflashLED . Value ;
SXDeadzone [ device ] = ( double ) nUDSX . Value ;
SZDeadzone [ device ] = ( double ) nUDSZ . Value ;
2017-07-19 00:28:16 +02:00
SXMaxzone [ device ] = ( double ) nUDSixAxisXMaxZone . Value ;
SZMaxzone [ device ] = ( double ) nUDSixAxisZMaxZone . Value ;
2017-07-19 02:44:55 +02:00
SXAntiDeadzone [ device ] = ( double ) nUDSixaxisXAntiDead . Value ;
SZAntiDeadzone [ device ] = ( double ) nUDSixaxisZAntiDead . Value ;
2019-06-26 08:35:41 +02:00
SquStickInfo [ device ] . lsMode = lsSquStickCk . Checked ;
SquStickInfo [ device ] . rsMode = rsSquStickCk . Checked ;
2019-09-14 05:26:58 +02:00
SquStickInfo [ device ] . lsRoundness = ( double ) RoundnessNUpDown . Value ;
SquStickInfo [ device ] . rsRoundness = ( double ) RoundnessRsNUD . Value ;
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
MouseAccel [ device ] = cBMouseAccel . Checked ;
DinputOnly [ device ] = cBDinput . Checked ;
StartTouchpadOff [ device ] = cbStartTouchpadOff . Checked ;
2015-11-28 06:47:26 +01:00
UseTPforControls [ device ] = rBTPControls . Checked ;
2019-08-23 05:03:03 +02:00
//UseSAforMouse[device] = rBSAMouse.Checked;
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
DS4Mapping = cBControllerInput . Checked ;
LSCurve [ device ] = ( int ) Math . Round ( nUDLSCurve . Value , 0 ) ;
RSCurve [ device ] = ( int ) Math . Round ( nUDRSCurve . Value , 0 ) ;
2014-12-13 21:12:03 +01:00
List < string > pactions = new List < string > ( ) ;
foreach ( ListViewItem lvi in lVActions . Items )
2017-04-26 23:51:15 +02:00
{
2014-12-13 21:12:03 +01:00
if ( lvi . Checked )
pactions . Add ( lvi . Text ) ;
2017-04-26 23:51:15 +02:00
}
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
ProfileActions [ device ] = pactions ;
2017-04-02 02:46:51 +02:00
calculateProfileActionCount ( device ) ;
calculateProfileActionDicts ( device ) ;
2017-05-20 12:38:12 +02:00
cacheProfileCustomsFlags ( device ) ;
2015-11-28 06:47:26 +01:00
pnlTPMouse . Visible = rBTPMouse . Checked ;
2019-08-23 05:03:03 +02:00
pnlSAMouse . Visible = false ;
fLPTiltControls . Visible = false ;
gyroMouseJoyFLP . Visible = false ;
2015-11-28 06:47:26 +01:00
fLPTouchSwipe . Visible = rBTPControls . Checked ;
2018-01-01 19:21:35 +01:00
TrackballMode [ device ] = trackballCk . Checked ;
TrackballFriction [ device ] = ( double ) trackFrictionNUD . Value ;
if ( device < 4 )
{
Program . rootHub . touchPad [ device ] ? . ResetTrackAccel ( TrackballFriction [ device ] ) ;
}
2015-11-28 06:47:26 +01:00
GyroSensitivity [ device ] = ( int ) Math . Round ( nUDGyroSensitivity . Value , 0 ) ;
2017-06-24 11:52:39 +02:00
GyroTriggerTurns [ device ] = gyroTriggerBehavior . Checked ;
GyroSensVerticalScale [ device ] = ( int ) nUDGyroMouseVertScale . Value ;
2017-06-29 06:42:16 +02:00
GyroSmoothing [ device ] = cBGyroSmooth . Checked ;
GyroSmoothingWeight [ device ] = ( double ) nUDGyroSmoothWeight . Value ;
2017-07-14 14:46:45 +02:00
GyroMouseHorizontalAxis [ device ] = cBGyroMouseXAxis . SelectedIndex ;
2019-01-31 17:59:00 +01:00
SetGyroMouseDeadZone ( device , ( int ) gyroMouseDzNUD . Value , Program . rootHub ) ;
2019-08-26 12:51:54 +02:00
//SetGyroMouseToggle(device, toggleGyroMCb.Checked, Program.rootHub);
2017-06-24 11:52:39 +02:00
2015-11-28 06:47:26 +01:00
int invert = 0 ;
if ( cBGyroInvertX . Checked )
invert + = 2 ;
2017-04-26 23:51:15 +02:00
2015-11-28 06:47:26 +01:00
if ( cBGyroInvertY . Checked )
invert + = 1 ;
2017-04-26 23:51:15 +02:00
2015-11-28 06:47:26 +01:00
GyroInvert [ device ] = invert ;
List < int > ints = new List < int > ( ) ;
2019-08-23 05:03:03 +02:00
/ * for ( int i = 0 , trigLen = cMGyroTriggers . Items . Count - 1 ; i < trigLen ; i + + )
2017-04-26 23:51:15 +02:00
{
2015-11-28 06:47:26 +01:00
if ( ( ( ToolStripMenuItem ) cMGyroTriggers . Items [ i ] ) . Checked )
ints . Add ( i ) ;
2017-04-26 23:51:15 +02:00
}
2015-12-13 22:30:54 +01:00
if ( ints . Count = = 0 )
ints . Add ( - 1 ) ;
2017-04-26 23:51:15 +02:00
2015-11-28 06:47:26 +01:00
SATriggers [ device ] = string . Join ( "," , ints ) ;
2018-09-30 04:54:25 +02:00
SetSaTriggerCond ( device , triggerCondAndCombo . SelectedItem . ToString ( ) . ToLower ( ) ) ;
2019-08-23 05:03:03 +02:00
* /
2017-04-26 23:51:15 +02:00
2017-08-05 05:36:46 +02:00
ints . Clear ( ) ;
2017-08-19 03:50:38 +02:00
for ( int i = 0 , trigLen = cMTouchDisableInvert . Items . Count ; i < trigLen ; i + + )
2017-08-05 05:36:46 +02:00
{
if ( ( ( ToolStripMenuItem ) cMTouchDisableInvert . Items [ i ] ) . Checked )
ints . Add ( i ) ;
}
if ( ints . Count = = 0 )
ints . Add ( - 1 ) ;
TouchDisInvertTriggers [ device ] = ints . ToArray ( ) ;
2015-12-13 22:30:54 +01:00
if ( nUDRainbow . Value = = 0 ) btnRainbow . Image = greyscale ;
else btnRainbow . Image = colored ;
2019-04-18 08:12:10 +02:00
int tempOutCont = OutContTypeCb . SelectedIndex ;
OutContType tempType = OutContType . X360 ;
switch ( tempOutCont )
{
case 0 : tempType = OutContType . X360 ; break ;
case 1 : tempType = OutContType . DS4 ; break ;
default : break ;
}
2019-10-25 08:48:56 +02:00
Global . OutContType [ device ] = tempType ;
2019-08-23 05:03:03 +02:00
switch ( gyroOutputMode . SelectedIndex )
{
case 0 :
GyroOutputMode [ device ] = GyroOutMode . Controls ;
break ;
case 1 :
GyroOutputMode [ device ] = GyroOutMode . Mouse ;
2019-08-26 12:51:54 +02:00
SetGyroMouseToggle ( device , toggleGyroMCb . Checked , Program . rootHub ) ;
2019-08-23 05:03:03 +02:00
break ;
case 2 :
GyroOutputMode [ device ] = GyroOutMode . MouseJoystick ;
2019-08-26 12:51:54 +02:00
SetGyroMouseStickToggle ( device ,
gyroMStickToggleCk . Checked , Program . rootHub ) ;
2019-08-23 05:03:03 +02:00
break ;
default :
break ;
}
GyroMouseStickTriggerTurns [ device ] = gyroMStickTrigBehaveCk . Checked ;
SetSaMouseStickTriggerCond ( device ,
gyroMouseStickEvalCombo . SelectedItem . ToString ( ) . ToLower ( ) ) ;
2019-08-27 05:15:38 +02:00
GyroMouseStickInfo gyroMouseStickInfo = GyroMouseStickInf [ device ] ;
2019-08-23 05:03:03 +02:00
if ( GyroMouseStickDead ( ) )
{
2019-08-27 05:15:38 +02:00
gyroMouseStickInfo . deadZone = ( int ) gyroMouseStickDZ . Value ;
gyroMouseStickInfo . maxZone = ( int ) gyroMouseStickMaxZ . Value ;
2019-08-23 05:03:03 +02:00
}
else
{
2019-08-27 05:15:38 +02:00
gyroMouseStickInfo . deadZone = ( int ) gyroMouseStickMaxZ . Value ;
gyroMouseStickInfo . maxZone = ( int ) gyroMouseStickMaxZ . Value ;
2019-08-23 05:03:03 +02:00
}
2019-08-27 05:15:38 +02:00
gyroMouseStickInfo . antiDeadX = ( double ) gyroMouseStickAntiDeadX . Value ;
gyroMouseStickInfo . antiDeadY = ( double ) gyroMouseStickAntiDeadY . Value ;
2019-08-23 05:03:03 +02:00
GyroMouseStickHorizontalAxis [ device ] = gyroMousestickXAxisCom . SelectedIndex ;
uint tempInvert = 0 ;
if ( gyroMouseStickInvertXCk . Checked ) tempInvert | = 1 < < 0 ;
if ( gyroMouseStickInvertYCk . Checked ) tempInvert | = 1 < < 1 ;
2019-08-27 05:15:38 +02:00
gyroMouseStickInfo . inverted = tempInvert ;
gyroMouseStickInfo . vertScale = ( int ) gyroMStickVertScaleNUD . Value ;
gyroMouseStickInfo . useSmoothing = gyroMStickUseSmoothCk . Checked ;
gyroMouseStickInfo . smoothWeight = ( double ) gyroMStickSmoothWeightNUD . Value ;
2014-05-12 07:48:50 +02:00
}
2015-11-28 06:47:26 +01:00
private void Show_ControlsBtn ( object sender , EventArgs e )
{
Control [ ] b = Controls . Find ( ( ( Button ) sender ) . Name . Remove ( 1 , 1 ) , true ) ;
if ( b ! = null & & b . Length = = 1 )
Show_ControlsBn ( b [ 0 ] , e ) ;
}
2014-04-27 21:32:09 +02:00
private void Show_ControlsBn ( object sender , EventArgs e )
{
2015-12-18 07:25:51 +01:00
KBM360 kbm360 = new KBM360 ( device , this , ( Button ) sender ) ;
kbm360 . Icon = Icon ;
2014-04-27 21:32:09 +02:00
kbm360 . ShowDialog ( ) ;
2015-12-18 07:25:51 +01:00
}
2014-04-27 21:32:09 +02:00
2017-05-05 10:28:45 +02:00
public void ChangeButtonText ( Control ctrl , bool shift , KeyValuePair < object , string > tag ,
bool SC , bool TG , bool MC , bool MR , int sTrigger = 0 )
2014-04-27 21:32:09 +02:00
{
2015-12-18 07:25:51 +01:00
DS4KeyType kt = DS4KeyType . None ;
if ( SC ) kt | = DS4KeyType . ScanCode ;
if ( TG ) kt | = DS4KeyType . Toggle ;
if ( MC ) kt | = DS4KeyType . Macro ;
2016-10-21 07:43:26 +02:00
if ( MR ) kt | = DS4KeyType . HoldMacro ;
2015-12-18 07:25:51 +01:00
UpdateDS4CSetting ( device , ctrl . Name , shift , tag . Key , tag . Value , kt , sTrigger ) ;
2014-04-27 21:32:09 +02:00
}
2015-12-18 07:25:51 +01:00
2017-05-20 06:59:47 +02:00
public void ChangeButtonText ( KeyValuePair < object , string > tag , Control ctrl , bool SC )
{
if ( ctrl is Button )
{
2015-12-18 07:25:51 +01:00
DS4KeyType kt = DS4KeyType . None ;
if ( SC ) kt | = DS4KeyType . ScanCode ;
UpdateDS4CSetting ( device , ctrl . Name , false , tag . Key , tag . Value , kt ) ;
2014-12-17 19:29:22 +01:00
}
2017-05-20 06:59:47 +02:00
}
2014-12-17 19:29:22 +01:00
2014-04-27 21:32:09 +02:00
private void btnLightbar_Click ( object sender , EventArgs e )
{
2017-11-23 02:38:06 +01:00
AdvancedColorDialog . ColorUpdateHandler tempDel =
new AdvancedColorDialog . ColorUpdateHandler ( advColorDialog_OnUpdateColor ) ;
advColorDialog . OnUpdateColor + = tempDel ;
2014-10-21 04:31:13 +02:00
advColorDialog . Color = Color . FromArgb ( tBRedBar . Value , tBGreenBar . Value , tBBlueBar . Value ) ;
2015-11-28 06:47:26 +01:00
advColorDialog_OnUpdateColor ( main , e ) ;
2019-03-23 07:27:05 +01:00
advColorDialog . FullOpen = true ;
2014-05-12 07:48:50 +02:00
if ( advColorDialog . ShowDialog ( ) = = DialogResult . OK )
{
2015-11-28 06:47:26 +01:00
main = advColorDialog . Color ;
2017-12-01 11:47:10 +01:00
btnLightBgImg = RecolorImage ( btnLightBg , main ) ;
btnLightbar . Refresh ( ) ;
2015-11-28 06:47:26 +01:00
if ( FlashColor [ device ] . Equals ( new DS4Color { red = 0 , green = 0 , blue = 0 } ) )
btnFlashColor . BackColor = main ;
2017-04-26 23:51:15 +02:00
2015-11-28 06:47:26 +01:00
btnFlashColor . BackgroundImage = nUDRainbow . Enabled ? rainbowImg : null ;
2014-10-21 04:31:13 +02:00
tBRedBar . Value = advColorDialog . Color . R ;
tBGreenBar . Value = advColorDialog . Color . G ;
tBBlueBar . Value = advColorDialog . Color . B ;
2014-05-12 07:48:50 +02:00
}
2017-04-26 23:51:15 +02:00
2017-11-23 02:38:06 +01:00
advColorDialog . OnUpdateColor - = tempDel ;
2014-12-02 01:07:29 +01:00
if ( device < 4 )
2015-02-08 22:51:52 +01:00
DS4LightBar . forcelight [ device ] = false ;
2014-03-28 02:50:40 +01:00
}
2015-12-18 07:25:51 +01:00
2014-05-12 07:48:50 +02:00
private void lowColorChooserButton_Click ( object sender , EventArgs e )
2014-03-28 02:50:40 +01:00
{
2017-04-26 23:51:15 +02:00
Color chooserBackColor = lowColorChooserButton . BackColor ;
advColorDialog . Color = chooserBackColor ;
advColorDialog_OnUpdateColor ( chooserBackColor , e ) ;
2014-05-12 07:48:50 +02:00
if ( advColorDialog . ShowDialog ( ) = = DialogResult . OK )
{
2017-04-26 23:51:15 +02:00
lowColorChooserButton . BackColor = chooserBackColor = advColorDialog . Color ;
2014-10-21 04:31:13 +02:00
tBLowRedBar . Value = advColorDialog . Color . R ;
tBLowGreenBar . Value = advColorDialog . Color . G ;
tBLowBlueBar . Value = advColorDialog . Color . B ;
2014-05-12 07:48:50 +02:00
}
2017-04-26 23:51:15 +02:00
2014-12-02 01:07:29 +01:00
if ( device < 4 )
2015-02-08 22:51:52 +01:00
DS4LightBar . forcelight [ device ] = false ;
2014-06-02 19:29:38 +02:00
}
private void btnChargingColor_Click ( object sender , EventArgs e )
{
2017-04-26 23:51:15 +02:00
Color chargingBackColor = btnChargingColor . BackColor ;
advColorDialog . Color = chargingBackColor ;
advColorDialog_OnUpdateColor ( chargingBackColor , e ) ;
2014-06-02 19:29:38 +02:00
if ( advColorDialog . ShowDialog ( ) = = DialogResult . OK )
{
2017-04-26 23:51:15 +02:00
btnChargingColor . BackColor = chargingBackColor = advColorDialog . Color ;
2014-06-02 19:29:38 +02:00
}
2017-04-26 23:51:15 +02:00
2014-12-02 01:07:29 +01:00
if ( device < 4 )
2015-02-10 22:45:56 +01:00
DS4LightBar . forcelight [ device ] = false ;
2017-04-26 23:51:15 +02:00
ChargingColor [ device ] = new DS4Color ( chargingBackColor ) ;
2014-04-30 21:32:44 +02:00
}
2017-04-26 23:51:15 +02:00
2019-03-07 20:35:13 +01:00
private void advColorDialog_OnUpdateColor ( Color color , EventArgs e )
2014-04-30 21:32:44 +02:00
{
2019-03-07 20:35:13 +01:00
if ( device < 4 )
2014-05-12 07:48:50 +02:00
{
2015-02-08 22:51:52 +01:00
DS4Color dcolor = new DS4Color { red = color . R , green = color . G , blue = color . B } ;
DS4LightBar . forcedColor [ device ] = dcolor ;
DS4LightBar . forcedFlash [ device ] = 0 ;
DS4LightBar . forcelight [ device ] = true ;
2014-04-27 21:32:09 +02:00
}
2014-03-28 02:50:40 +01:00
}
2017-04-26 23:51:15 +02:00
2015-11-28 06:47:26 +01:00
private void SetColorToolTip ( TrackBar tb , int type )
2014-04-30 21:32:44 +02:00
{
2015-11-28 06:47:26 +01:00
if ( tb ! = null )
{
int value = tb . Value ;
int sat = bgc - ( value < bgc ? value : bgc ) ;
int som = bgc + 11 * ( int ) ( value * 0.0039215 ) ;
tb . BackColor = Color . FromArgb ( tb . Name . ToLower ( ) . Contains ( "red" ) ? som : sat , tb . Name . ToLower ( ) . Contains ( "green" ) ? som : sat , tb . Name . ToLower ( ) . Contains ( "blue" ) ? som : sat ) ;
}
2017-04-26 23:51:15 +02:00
if ( type = = 0 ) // main
2015-11-28 06:47:26 +01:00
{
alphacolor = Math . Max ( tBRedBar . Value , Math . Max ( tBGreenBar . Value , tBBlueBar . Value ) ) ;
reg = Color . FromArgb ( tBRedBar . Value , tBGreenBar . Value , tBBlueBar . Value ) ;
full = HuetoRGB ( reg . GetHue ( ) , reg . GetBrightness ( ) , reg ) ;
main = Color . FromArgb ( ( alphacolor > 205 ? 255 : ( alphacolor + 50 ) ) , full ) ;
2017-12-01 11:47:10 +01:00
btnLightBgImg = RecolorImage ( btnLightBg , main ) ;
btnLightbar . Refresh ( ) ;
2015-11-28 06:47:26 +01:00
if ( FlashColor [ device ] . Equals ( new DS4Color { red = 0 , green = 0 , blue = 0 } ) )
btnFlashColor . BackColor = main ;
btnFlashColor . BackgroundImage = nUDRainbow . Enabled ? rainbowImg : null ;
MainColor [ device ] = new DS4Color ( ( byte ) tBRedBar . Value , ( byte ) tBGreenBar . Value , ( byte ) tBBlueBar . Value ) ;
}
else if ( type = = 1 )
{
alphacolor = Math . Max ( tBLowRedBar . Value , Math . Max ( tBLowGreenBar . Value , tBLowBlueBar . Value ) ) ;
reg = Color . FromArgb ( tBLowRedBar . Value , tBLowGreenBar . Value , tBLowBlueBar . Value ) ;
full = HuetoRGB ( reg . GetHue ( ) , reg . GetBrightness ( ) , reg ) ;
lowColorChooserButton . BackColor = Color . FromArgb ( ( alphacolor > 205 ? 255 : ( alphacolor + 50 ) ) , full ) ;
LowColor [ device ] = new DS4Color ( ( byte ) tBLowRedBar . Value , ( byte ) tBLowGreenBar . Value , ( byte ) tBLowBlueBar . Value ) ;
}
2017-04-26 23:51:15 +02:00
2015-11-30 22:15:17 +01:00
if ( ! saving & & ! loading & & tb ! = null )
2019-09-24 22:15:58 +02:00
tp . Show ( tb . Value . ToString ( ) , tb , ( int ) ( dpix * 100 ) , 0 , 1000 ) ;
2014-04-30 21:32:44 +02:00
}
2015-11-28 06:47:26 +01:00
int bgc = 245 ; //Color of the form background, If greyscale color
private void MainBar_ValueChanged ( object sender , EventArgs e )
2014-04-30 21:32:44 +02:00
{
2015-11-28 06:47:26 +01:00
SetColorToolTip ( ( TrackBar ) sender , 0 ) ;
2014-04-27 21:32:09 +02:00
}
2015-11-28 06:47:26 +01:00
private void LowBar_ValueChanged ( object sender , EventArgs e )
2014-07-26 01:17:45 +02:00
{
2015-11-28 06:47:26 +01:00
SetColorToolTip ( ( TrackBar ) sender , 1 ) ;
}
2015-12-18 07:25:51 +01:00
2014-05-12 07:48:50 +02:00
public Color HuetoRGB ( float hue , float light , Color rgb )
{
float L = ( float ) Math . Max ( . 5 , light ) ;
float C = ( 1 - Math . Abs ( 2 * L - 1 ) ) ;
float X = ( C * ( 1 - Math . Abs ( ( hue / 60 ) % 2 - 1 ) ) ) ;
float m = L - C / 2 ;
float R = 0 , G = 0 , B = 0 ;
2017-04-26 23:51:15 +02:00
2014-12-13 21:12:03 +01:00
if ( light = = 1 ) return Color . White ;
else if ( rgb . R = = rgb . G & & rgb . G = = rgb . B ) return Color . White ;
2014-05-12 07:48:50 +02:00
else if ( 0 < = hue & & hue < 60 ) { R = C ; G = X ; }
else if ( 60 < = hue & & hue < 120 ) { R = X ; G = C ; }
else if ( 120 < = hue & & hue < 180 ) { G = C ; B = X ; }
else if ( 180 < = hue & & hue < 240 ) { G = X ; B = C ; }
else if ( 240 < = hue & & hue < 300 ) { R = X ; B = C ; }
else if ( 300 < = hue & & hue < 360 ) { R = C ; B = X ; }
return Color . FromArgb ( ( int ) ( ( R + m ) * 255 ) , ( int ) ( ( G + m ) * 255 ) , ( int ) ( ( B + m ) * 255 ) ) ;
}
2017-05-20 12:38:12 +02:00
2014-03-28 02:50:40 +01:00
private void rumbleBoostBar_ValueChanged ( object sender , EventArgs e )
{
2017-05-02 17:00:54 +02:00
if ( ! loading )
{
RumbleBoost [ device ] = ( byte ) nUDRumbleBoost . Value ;
byte h = ( byte ) Math . Min ( 255 , ( 255 * nUDRumbleBoost . Value / 100 ) ) ;
byte l = ( byte ) Math . Min ( 255 , ( 255 * nUDRumbleBoost . Value / 100 ) ) ;
bool hB = btnRumbleHeavyTest . Text = = Properties . Resources . TestLText ;
bool lB = btnRumbleLightTest . Text = = Properties . Resources . TestLText ;
Program . rootHub . setRumble ( ( byte ) ( hB ? h : 0 ) , ( byte ) ( lB ? l : 0 ) , device ) ;
}
2014-05-05 09:42:05 +02:00
}
2014-03-28 02:50:40 +01:00
2014-11-18 22:23:41 +01:00
private void btnRumbleHeavyTest_Click ( object sender , EventArgs e )
2014-03-28 02:50:40 +01:00
{
2017-05-20 12:38:12 +02:00
int tempDeviceNum = ( int ) nUDSixaxis . Value - 1 ;
DS4Device d = Program . rootHub . DS4Controllers [ tempDeviceNum ] ;
2015-02-08 22:51:52 +01:00
if ( d ! = null )
2017-04-26 23:51:15 +02:00
{
2015-02-08 22:51:52 +01:00
if ( ( ( Button ) sender ) . Text = = Properties . Resources . TestHText )
{
2017-05-20 12:38:12 +02:00
Program . rootHub . setRumble ( ( byte ) Math . Min ( 255 , ( 255 * nUDRumbleBoost . Value / 100 ) ) , d . RightLightFastRumble , tempDeviceNum ) ;
2015-02-08 22:51:52 +01:00
( ( Button ) sender ) . Text = Properties . Resources . StopHText ;
}
else
{
2017-05-20 12:38:12 +02:00
Program . rootHub . setRumble ( 0 , d . RightLightFastRumble , tempDeviceNum ) ;
2015-02-08 22:51:52 +01:00
( ( Button ) sender ) . Text = Properties . Resources . TestHText ;
}
2017-04-26 23:51:15 +02:00
}
2014-03-28 02:50:40 +01:00
}
2014-11-18 22:23:41 +01:00
private void btnRumbleLightTest_Click ( object sender , EventArgs e )
{
2017-05-20 12:38:12 +02:00
int tempDeviceNum = ( int ) nUDSixaxis . Value - 1 ;
DS4Device d = Program . rootHub . DS4Controllers [ tempDeviceNum ] ;
2015-02-08 22:51:52 +01:00
if ( d ! = null )
2017-04-26 23:51:15 +02:00
{
2015-02-08 22:51:52 +01:00
if ( ( ( Button ) sender ) . Text = = Properties . Resources . TestLText )
{
2017-05-20 12:38:12 +02:00
Program . rootHub . setRumble ( d . LeftHeavySlowRumble , ( byte ) Math . Min ( 255 , ( 255 * nUDRumbleBoost . Value / 100 ) ) , tempDeviceNum ) ;
2015-02-08 22:51:52 +01:00
( ( Button ) sender ) . Text = Properties . Resources . StopLText ;
}
else
{
2017-05-20 12:38:12 +02:00
Program . rootHub . setRumble ( d . LeftHeavySlowRumble , 0 , tempDeviceNum ) ;
2015-02-08 22:51:52 +01:00
( ( Button ) sender ) . Text = Properties . Resources . TestLText ;
}
2017-04-26 23:51:15 +02:00
}
2014-11-18 22:23:41 +01:00
}
2014-04-27 21:32:09 +02:00
private void numUDTouch_ValueChanged ( object sender , EventArgs e )
2014-03-28 02:50:40 +01:00
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
TouchSensitivity [ device ] = ( byte ) nUDTouch . Value ;
2014-03-28 02:50:40 +01:00
}
2014-04-27 21:32:09 +02:00
private void numUDTap_ValueChanged ( object sender , EventArgs e )
2014-03-28 02:50:40 +01:00
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
TapSensitivity [ device ] = ( byte ) nUDTap . Value ;
2014-04-27 21:32:09 +02:00
}
2014-03-28 02:50:40 +01:00
2014-04-27 21:32:09 +02:00
private void numUDScroll_ValueChanged ( object sender , EventArgs e )
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
ScrollSensitivity [ device ] = ( int ) nUDScroll . Value ;
2014-03-28 02:50:40 +01:00
}
2017-04-26 23:51:15 +02:00
2014-03-28 02:50:40 +01:00
private void ledAsBatteryIndicator_CheckedChanged ( object sender , EventArgs e )
{
2017-04-26 23:51:15 +02:00
bool lightByBatteryChecked = cBLightbyBattery . Checked ;
LedAsBatteryIndicator [ device ] = lightByBatteryChecked ;
pnlLowBattery . Visible = lightByBatteryChecked ;
//pnlFull.Location = new Point(pnlFull.Location.X, (lightByBatteryChecked ? (int)(dpix * 42) : (pnlFull.Location.Y + pnlLowBattery.Location.Y) / 2));
lbFull . Text = ( lightByBatteryChecked ? Properties . Resources . Full + ":" : Properties . Resources . Color + ":" ) ;
2014-03-28 02:50:40 +01:00
}
2014-05-24 04:30:43 +02:00
2014-03-28 02:50:40 +01:00
private void lowerRCOffCheckBox_CheckedChanged ( object sender , EventArgs e )
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
LowerRCOn [ device ] = cBlowerRCOn . Checked ;
2014-03-28 02:50:40 +01:00
}
private void touchpadJitterCompensation_CheckedChanged ( object sender , EventArgs e )
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
TouchpadJitterCompensation [ device ] = cBTouchpadJitterCompensation . Checked ;
2014-03-28 02:50:40 +01:00
}
2014-05-12 07:48:50 +02:00
2014-03-28 02:50:40 +01:00
private void flushHIDQueue_CheckedChanged ( object sender , EventArgs e )
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
FlushHIDQueue [ device ] = cBFlushHIDQueue . Checked ;
2014-03-28 02:50:40 +01:00
}
2014-06-09 01:41:36 +02:00
private void nUDIdleDisconnect_ValueChanged ( object sender , EventArgs e )
2014-04-27 21:32:09 +02:00
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
IdleDisconnectTimeout [ device ] = ( int ) ( nUDIdleDisconnect . Value * 60 ) ;
2014-06-09 01:41:36 +02:00
}
private void cBIdleDisconnect_CheckedChanged ( object sender , EventArgs e )
{
2017-04-26 23:51:15 +02:00
bool idleDisconnectChecked = cBIdleDisconnect . Checked ;
if ( idleDisconnectChecked )
2014-06-09 01:41:36 +02:00
nUDIdleDisconnect . Value = 5 ;
else
nUDIdleDisconnect . Value = 0 ;
2017-04-26 23:51:15 +02:00
nUDIdleDisconnect . Enabled = idleDisconnectChecked ;
2014-04-27 21:32:09 +02:00
}
2014-03-28 02:50:40 +01:00
2015-11-30 22:15:17 +01:00
private void Options_FormClosing ( object sender , FormClosingEventArgs e )
2014-04-27 21:32:09 +02:00
{
2014-04-30 05:54:41 +02:00
for ( int i = 0 ; i < 4 ; i + + )
2017-05-11 15:41:18 +02:00
LoadProfile ( i , false , Program . rootHub ) ; // Refreshes all profiles in case other controllers are using the same profile
2017-04-26 23:51:15 +02:00
2014-11-18 22:23:41 +01:00
if ( btnRumbleHeavyTest . Text = = Properties . Resources . StopText )
2014-12-13 21:12:03 +01:00
Program . rootHub . setRumble ( 0 , 0 , ( int ) nUDSixaxis . Value - 1 ) ;
2017-04-26 23:51:15 +02:00
2017-05-17 08:02:12 +02:00
if ( saving )
{
if ( device < 4 )
{
DS4Device tempDev = Program . rootHub . DS4Controllers [ device ] ;
if ( tempDev ! = null )
{
int discon = getIdleDisconnectTimeout ( device ) ;
int btCurrentIndex = btPollRateComboBox . SelectedIndex ;
2018-03-21 23:31:22 +01:00
2017-05-17 08:02:12 +02:00
tempDev . queueEvent ( ( ) = >
{
tempDev . setIdleTimeout ( discon ) ;
if ( btCurrentIndex > = 0 )
{
tempDev . setBTPollRate ( btCurrentIndex ) ;
}
} ) ;
}
}
}
2014-05-30 22:39:39 +02:00
inputtimer . Stop ( ) ;
sixaxisTimer . Stop ( ) ;
2015-11-30 22:15:17 +01:00
root . OptionsClosed ( ) ;
2019-09-24 22:15:58 +02:00
tp . Dispose ( ) ;
2015-11-30 22:15:17 +01:00
Visible = false ;
2018-08-13 04:55:09 +02:00
e . Cancel = false ;
2015-11-30 22:15:17 +01:00
}
2014-05-12 07:48:50 +02:00
private void cBSlide_CheckedChanged ( object sender , EventArgs e )
2014-04-27 21:32:09 +02:00
{
2017-04-26 23:51:15 +02:00
bool slideChecked = cBSlide . Checked ;
if ( slideChecked )
2014-06-09 01:41:36 +02:00
nUDTouch . Value = 100 ;
2014-04-27 21:32:09 +02:00
else
2014-06-09 01:41:36 +02:00
nUDTouch . Value = 0 ;
2017-04-26 23:51:15 +02:00
nUDTouch . Enabled = slideChecked ;
2014-04-27 21:32:09 +02:00
}
private void cBScroll_CheckedChanged ( object sender , EventArgs e )
{
2017-04-26 23:51:15 +02:00
bool scrollChecked = cBScroll . Checked ;
if ( scrollChecked )
2014-06-09 01:41:36 +02:00
nUDScroll . Value = 5 ;
2014-04-27 21:32:09 +02:00
else
2014-06-09 01:41:36 +02:00
nUDScroll . Value = 0 ;
2017-04-26 23:51:15 +02:00
nUDScroll . Enabled = scrollChecked ;
2014-04-27 21:32:09 +02:00
}
private void cBTap_CheckedChanged ( object sender , EventArgs e )
{
2017-04-26 23:51:15 +02:00
bool tapChecked = cBTap . Checked ;
if ( tapChecked )
2014-06-09 01:41:36 +02:00
nUDTap . Value = 100 ;
2014-04-27 21:32:09 +02:00
else
2014-06-09 01:41:36 +02:00
nUDTap . Value = 0 ;
2017-04-26 23:51:15 +02:00
nUDTap . Enabled = tapChecked ;
cBDoubleTap . Enabled = tapChecked ;
2014-04-27 21:32:09 +02:00
}
2014-04-29 03:14:01 +02:00
private void cBDoubleTap_CheckedChanged ( object sender , EventArgs e )
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
DoubleTap [ device ] = cBDoubleTap . Checked ;
2014-04-29 03:14:01 +02:00
}
2014-04-27 21:32:09 +02:00
public void UpdateLists ( )
{
2017-08-23 04:13:01 +02:00
lBControls . BeginUpdate ( ) ;
2015-12-18 07:25:51 +01:00
lBControls . Items [ 0 ] = "Cross : " + UpdateButtonList ( bnCross ) ;
lBControls . Items [ 1 ] = "Circle : " + UpdateButtonList ( bnCircle ) ;
lBControls . Items [ 2 ] = "Square : " + UpdateButtonList ( bnSquare ) ;
lBControls . Items [ 3 ] = "Triangle : " + UpdateButtonList ( bnTriangle ) ;
lBControls . Items [ 4 ] = "Options : " + UpdateButtonList ( bnOptions ) ;
lBControls . Items [ 5 ] = "Share : " + UpdateButtonList ( bnShare ) ;
lBControls . Items [ 6 ] = "Up : " + UpdateButtonList ( bnUp ) ;
lBControls . Items [ 7 ] = "Down : " + UpdateButtonList ( bnDown ) ;
lBControls . Items [ 8 ] = "Left : " + UpdateButtonList ( bnLeft ) ;
lBControls . Items [ 9 ] = "Right : " + UpdateButtonList ( bnRight ) ;
lBControls . Items [ 10 ] = "PS : " + UpdateButtonList ( bnPS ) ;
lBControls . Items [ 11 ] = "L1 : " + UpdateButtonList ( bnL1 ) ;
lBControls . Items [ 12 ] = "R1 : " + UpdateButtonList ( bnR1 ) ;
lBControls . Items [ 13 ] = "L2 : " + UpdateButtonList ( bnL2 ) ;
lBControls . Items [ 14 ] = "R2 : " + UpdateButtonList ( bnR2 ) ;
lBControls . Items [ 15 ] = "L3 : " + UpdateButtonList ( bnL3 ) ;
lBControls . Items [ 16 ] = "R3 : " + UpdateButtonList ( bnR3 ) ;
lBControls . Items [ 17 ] = "Left Touch : " + UpdateButtonList ( bnTouchLeft ) ;
lBControls . Items [ 18 ] = "Right Touch : " + UpdateButtonList ( bnTouchRight ) ;
lBControls . Items [ 19 ] = "Multitouch : " + UpdateButtonList ( bnTouchMulti ) ;
lBControls . Items [ 20 ] = "Upper Touch : " + UpdateButtonList ( bnTouchUpper ) ;
lBControls . Items [ 21 ] = "LS Up : " + UpdateButtonList ( bnLSUp ) ;
lBControls . Items [ 22 ] = "LS Down : " + UpdateButtonList ( bnLSDown ) ;
lBControls . Items [ 23 ] = "LS Left : " + UpdateButtonList ( bnLSLeft ) ;
lBControls . Items [ 24 ] = "LS Right : " + UpdateButtonList ( bnLSRight ) ;
lBControls . Items [ 25 ] = "RS Up : " + UpdateButtonList ( bnRSUp ) ;
lBControls . Items [ 26 ] = "RS Down : " + UpdateButtonList ( bnRSDown ) ;
lBControls . Items [ 27 ] = "RS Left : " + UpdateButtonList ( bnRSLeft ) ;
lBControls . Items [ 28 ] = "RS Right : " + UpdateButtonList ( bnRSRight ) ;
lBControls . Items [ 29 ] = Properties . Resources . TiltUp + " : " + UpdateButtonList ( bnGyroZN ) ;
lBControls . Items [ 30 ] = Properties . Resources . TiltDown + " : " + UpdateButtonList ( bnGyroZP ) ;
lBControls . Items [ 31 ] = Properties . Resources . TiltLeft + " : " + UpdateButtonList ( bnGyroXP ) ;
lBControls . Items [ 32 ] = Properties . Resources . TiltRight + " : " + UpdateButtonList ( bnGyroXN ) ;
2014-11-15 22:54:14 +01:00
if ( lBControls . Items . Count > 33 )
{
2015-12-18 07:25:51 +01:00
lBControls . Items [ 33 ] = Properties . Resources . SwipeUp + " : " + UpdateButtonList ( bnSwipeUp ) ;
lBControls . Items [ 34 ] = Properties . Resources . SwipeDown + " : " + UpdateButtonList ( bnSwipeDown ) ;
lBControls . Items [ 35 ] = Properties . Resources . SwipeLeft + " : " + UpdateButtonList ( bnSwipeLeft ) ;
lBControls . Items [ 36 ] = Properties . Resources . SwipeRight + " : " + UpdateButtonList ( bnSwipeRight ) ;
lbSwipeUp . Text = UpdateButtonList ( bnSwipeUp ) ;
lbSwipeDown . Text = UpdateButtonList ( bnSwipeDown ) ;
lbSwipeLeft . Text = UpdateButtonList ( bnSwipeLeft ) ;
lbSwipeRight . Text = UpdateButtonList ( bnSwipeRight ) ;
2014-11-15 22:54:14 +01:00
}
2015-12-18 07:25:51 +01:00
2017-08-23 04:13:01 +02:00
lBControls . EndUpdate ( ) ;
2015-12-18 07:25:51 +01:00
lbGyroXN . Text = UpdateButtonList ( bnGyroXN ) ;
lbGyroZN . Text = UpdateButtonList ( bnGyroZN ) ;
lbGyroZP . Text = UpdateButtonList ( bnGyroZP ) ;
lbGyroXP . Text = UpdateButtonList ( bnGyroXP ) ;
2015-11-28 06:47:26 +01:00
}
2019-10-06 04:57:20 +02:00
private string UpdateButtonList ( Button button , bool shift = false )
2014-06-24 00:27:14 +02:00
{
2015-12-18 07:25:51 +01:00
object tagO = GetDS4Action ( device , button . Name , shift ) ;
2019-10-06 04:57:20 +02:00
bool SC = GetDS4KeyType ( device , button . Name , shift ) . HasFlag ( DS4KeyType . ScanCode ) ;
2014-12-17 19:29:22 +01:00
bool extracontrol = button . Name . Contains ( "Gyro" ) | | button . Name . Contains ( "Swipe" ) ;
2015-12-18 07:25:51 +01:00
if ( tagO ! = null )
{
if ( tagO is int | | tagO is ushort )
{
2017-05-05 10:28:45 +02:00
//return (Keys)int.Parse(tagO.ToString()) + (SC ? " (" + Properties.Resources.ScanCode + ")" : "");
return ( Keys ) Convert . ToInt32 ( tagO ) + ( SC ? " (" + Properties . Resources . ScanCode + ")" : "" ) ;
2015-12-18 07:25:51 +01:00
}
else if ( tagO is int [ ] )
{
return Properties . Resources . Macro + ( SC ? " (" + Properties . Resources . ScanCode + ")" : "" ) ;
}
2017-05-05 10:28:45 +02:00
else if ( tagO is X360Controls )
2015-12-18 07:25:51 +01:00
{
string tag ;
2019-10-24 23:49:20 +02:00
tag = KBM360 . getX360ControlsByName ( ( X360Controls ) tagO , Global . outDevTypeTemp [ device ] ) ;
2017-05-05 10:28:45 +02:00
return tag ;
}
else if ( tagO is string )
{
string tag ;
tag = tagO . ToString ( ) ;
2015-12-18 07:25:51 +01:00
return tag ;
}
2015-11-28 06:47:26 +01:00
else
2015-12-18 07:25:51 +01:00
return defaults [ button . Name ] ;
}
else if ( ! extracontrol & & ! shift & & defaults . ContainsKey ( button . Name ) )
2014-12-17 19:29:22 +01:00
return defaults [ button . Name ] ;
2015-12-18 07:25:51 +01:00
else if ( shift )
return "" ;
2014-06-24 00:27:14 +02:00
else
2015-11-30 22:15:17 +01:00
return Properties . Resources . Unassigned ;
2014-04-27 21:32:09 +02:00
}
2017-05-05 10:28:45 +02:00
2014-04-27 21:32:09 +02:00
private void Show_ControlsList ( object sender , EventArgs e )
{
2017-04-26 23:51:15 +02:00
int controlSelectedIndex = lBControls . SelectedIndex ;
2017-05-05 10:28:45 +02:00
2017-04-26 23:51:15 +02:00
if ( controlSelectedIndex = = 0 ) Show_ControlsBn ( bnCross , e ) ;
else if ( controlSelectedIndex = = 1 ) Show_ControlsBn ( bnCircle , e ) ;
else if ( controlSelectedIndex = = 2 ) Show_ControlsBn ( bnSquare , e ) ;
else if ( controlSelectedIndex = = 3 ) Show_ControlsBn ( bnTriangle , e ) ;
else if ( controlSelectedIndex = = 4 ) Show_ControlsBn ( bnOptions , e ) ;
else if ( controlSelectedIndex = = 5 ) Show_ControlsBn ( bnShare , e ) ;
else if ( controlSelectedIndex = = 6 ) Show_ControlsBn ( bnUp , e ) ;
else if ( controlSelectedIndex = = 7 ) Show_ControlsBn ( bnDown , e ) ;
else if ( controlSelectedIndex = = 8 ) Show_ControlsBn ( bnLeft , e ) ;
else if ( controlSelectedIndex = = 9 ) Show_ControlsBn ( bnRight , e ) ;
else if ( controlSelectedIndex = = 10 ) Show_ControlsBn ( bnPS , e ) ;
else if ( controlSelectedIndex = = 11 ) Show_ControlsBn ( bnL1 , e ) ;
else if ( controlSelectedIndex = = 12 ) Show_ControlsBn ( bnR1 , e ) ;
else if ( controlSelectedIndex = = 13 ) Show_ControlsBn ( bnL2 , e ) ;
else if ( controlSelectedIndex = = 14 ) Show_ControlsBn ( bnR2 , e ) ;
else if ( controlSelectedIndex = = 15 ) Show_ControlsBn ( bnL3 , e ) ;
else if ( controlSelectedIndex = = 16 ) Show_ControlsBn ( bnR3 , e ) ;
else if ( controlSelectedIndex = = 17 ) Show_ControlsBn ( bnTouchLeft , e ) ;
else if ( controlSelectedIndex = = 18 ) Show_ControlsBn ( bnTouchRight , e ) ;
else if ( controlSelectedIndex = = 19 ) Show_ControlsBn ( bnTouchMulti , e ) ;
else if ( controlSelectedIndex = = 20 ) Show_ControlsBn ( bnTouchUpper , e ) ;
else if ( controlSelectedIndex = = 21 ) Show_ControlsBn ( bnLSUp , e ) ;
else if ( controlSelectedIndex = = 22 ) Show_ControlsBn ( bnLSDown , e ) ;
else if ( controlSelectedIndex = = 23 ) Show_ControlsBn ( bnLSLeft , e ) ;
else if ( controlSelectedIndex = = 24 ) Show_ControlsBn ( bnLSRight , e ) ;
else if ( controlSelectedIndex = = 25 ) Show_ControlsBn ( bnRSUp , e ) ;
else if ( controlSelectedIndex = = 26 ) Show_ControlsBn ( bnRSDown , e ) ;
else if ( controlSelectedIndex = = 27 ) Show_ControlsBn ( bnRSLeft , e ) ;
else if ( controlSelectedIndex = = 28 ) Show_ControlsBn ( bnRSRight , e ) ;
else if ( controlSelectedIndex = = 29 ) Show_ControlsBn ( bnGyroZN , e ) ;
else if ( controlSelectedIndex = = 30 ) Show_ControlsBn ( bnGyroZP , e ) ;
else if ( controlSelectedIndex = = 31 ) Show_ControlsBn ( bnGyroXP , e ) ;
else if ( controlSelectedIndex = = 32 ) Show_ControlsBn ( bnGyroXN , e ) ;
else if ( controlSelectedIndex = = 33 ) Show_ControlsBn ( bnSwipeUp , e ) ;
else if ( controlSelectedIndex = = 34 ) Show_ControlsBn ( bnSwipeDown , e ) ;
else if ( controlSelectedIndex = = 35 ) Show_ControlsBn ( bnSwipeLeft , e ) ;
else if ( controlSelectedIndex = = 36 ) Show_ControlsBn ( bnSwipeRight , e ) ;
2015-12-18 07:25:51 +01:00
}
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
2014-04-27 21:32:09 +02:00
private void List_MouseDoubleClick ( object sender , MouseEventArgs e )
{
Show_ControlsList ( sender , e ) ;
}
private void List_KeyDown ( object sender , KeyEventArgs e )
{
if ( e . KeyValue = = 13 )
2015-12-18 07:25:51 +01:00
Show_ControlsList ( sender , e ) ;
2014-04-27 21:32:09 +02:00
}
2014-04-29 23:56:58 +02:00
2014-04-30 21:32:44 +02:00
private void numUDRainbow_ValueChanged ( object sender , EventArgs e )
{
2017-05-20 12:38:12 +02:00
double tempRainbow = ( double ) nUDRainbow . Value ;
Rainbow [ device ] = tempRainbow ;
if ( tempRainbow < = 0.5 )
2014-05-05 04:25:53 +02:00
{
2015-12-13 22:30:54 +01:00
btnRainbow . Image = greyscale ;
2014-05-05 04:25:53 +02:00
ToggleRainbow ( false ) ;
2014-06-09 01:41:36 +02:00
nUDRainbow . Value = 0 ;
2014-05-05 04:25:53 +02:00
}
2014-04-30 21:32:44 +02:00
}
2015-12-13 22:30:54 +01:00
private void btnRainbow_Click ( object sender , EventArgs e )
2014-04-30 21:32:44 +02:00
{
2015-12-13 22:30:54 +01:00
if ( btnRainbow . Image = = greyscale )
2014-04-30 21:32:44 +02:00
{
2015-12-13 22:30:54 +01:00
btnRainbow . Image = colored ;
2014-04-30 21:32:44 +02:00
ToggleRainbow ( true ) ;
2014-06-09 01:41:36 +02:00
nUDRainbow . Value = 5 ;
2014-04-30 21:32:44 +02:00
}
else
{
2015-12-13 22:30:54 +01:00
btnRainbow . Image = greyscale ;
2014-04-30 21:32:44 +02:00
ToggleRainbow ( false ) ;
2014-06-09 01:41:36 +02:00
nUDRainbow . Value = 0 ;
2014-04-30 21:32:44 +02:00
}
}
private void ToggleRainbow ( bool on )
{
2014-06-09 01:41:36 +02:00
nUDRainbow . Enabled = on ;
2014-04-30 21:32:44 +02:00
if ( on )
{
2017-12-01 11:47:10 +01:00
btnLightBgImg = RecolorImage ( btnLightBg , main ) ;
btnLightbar . Refresh ( ) ;
2014-08-17 00:09:15 +02:00
cBLightbyBattery . Text = Properties . Resources . DimByBattery . Replace ( "*nl*" , "\n" ) ;
2014-04-30 21:32:44 +02:00
}
else
{
2014-11-01 22:49:22 +01:00
pnlLowBattery . Enabled = cBLightbyBattery . Checked ;
2017-12-01 11:47:10 +01:00
btnLightBgImg = RecolorImage ( btnLightBg , main ) ;
btnLightbar . Refresh ( ) ;
2014-08-17 00:09:15 +02:00
cBLightbyBattery . Text = Properties . Resources . ColorByBattery . Replace ( "*nl*" , "\n" ) ;
2014-04-30 21:32:44 +02:00
}
2017-04-26 23:51:15 +02:00
2015-11-28 06:47:26 +01:00
if ( FlashColor [ device ] . Equals ( new DS4Color { red = 0 , green = 0 , blue = 0 } ) )
btnFlashColor . BackColor = main ;
2017-04-26 23:51:15 +02:00
2015-11-28 06:47:26 +01:00
btnFlashColor . BackgroundImage = nUDRainbow . Enabled ? rainbowImg : null ;
2014-07-26 01:17:45 +02:00
lbspc . Enabled = on ;
2014-11-01 22:49:22 +01:00
pnlLowBattery . Enabled = ! on ;
pnlFull . Enabled = ! on ;
2014-04-30 21:32:44 +02:00
}
private Bitmap GreyscaleImage ( Bitmap image )
{
2015-11-28 06:47:26 +01:00
Bitmap c = image ;
2014-04-30 21:32:44 +02:00
Bitmap d = new Bitmap ( c . Width , c . Height ) ;
2017-04-26 23:51:15 +02:00
for ( int i = 0 , bitwidth = c . Width ; i < bitwidth ; i + + )
2014-04-30 21:32:44 +02:00
{
2017-04-26 23:51:15 +02:00
for ( int x = 0 , bitheight = c . Height ; x < bitheight ; x + + )
2014-04-30 21:32:44 +02:00
{
Color oc = c . GetPixel ( i , x ) ;
int grayScale = ( int ) ( ( oc . R * 0.3 ) + ( oc . G * 0.59 ) + ( oc . B * 0.11 ) ) ;
Color nc = Color . FromArgb ( oc . A , grayScale , grayScale , grayScale ) ;
d . SetPixel ( i , x , nc ) ;
}
}
2017-04-26 23:51:15 +02:00
2014-04-30 21:32:44 +02:00
return d ;
}
2014-05-05 09:31:24 +02:00
2015-11-28 06:47:26 +01:00
private Bitmap RecolorImage ( Bitmap image , Color color )
{
2017-12-01 11:47:10 +01:00
Bitmap c = image ;
2015-11-28 06:47:26 +01:00
Bitmap d = new Bitmap ( c . Width , c . Height ) ;
2017-12-01 11:47:10 +01:00
bool rainEnabled = nUDRainbow . Enabled ;
2015-11-28 06:47:26 +01:00
2017-04-26 23:51:15 +02:00
for ( int i = 0 , bitwidth = c . Width ; i < bitwidth ; i + + )
{
for ( int x = 0 , bitheight = c . Height ; x < bitheight ; x + + )
{
2017-12-01 11:47:10 +01:00
if ( ! rainEnabled )
2015-11-28 06:47:26 +01:00
{
Color col = c . GetPixel ( i , x ) ;
col = Color . FromArgb ( ( int ) ( col . A * ( color . A / 255f ) ) , color . R , color . G , color . B ) ;
d . SetPixel ( i , x , col ) ;
}
else
{
2017-12-01 11:47:10 +01:00
Color col = HuetoRGB ( ( i / ( float ) bitwidth ) * 360 , . 5f , Color . Red ) ;
2015-11-28 06:47:26 +01:00
d . SetPixel ( i , x , Color . FromArgb ( c . GetPixel ( i , x ) . A , col ) ) ;
}
2017-04-26 23:51:15 +02:00
}
}
2015-11-28 06:47:26 +01:00
return d ;
}
2014-05-05 09:31:24 +02:00
private void numUDL2_ValueChanged ( object sender , EventArgs e )
{
2019-07-01 03:59:51 +02:00
L2ModInfo [ device ] . deadZone = ( byte ) ( nUDL2 . Value * 255 ) ;
2014-05-05 09:31:24 +02:00
}
private void numUDR2_ValueChanged ( object sender , EventArgs e )
{
2019-07-01 03:59:51 +02:00
R2ModInfo [ device ] . deadZone = ( byte ) ( nUDR2 . Value * 255 ) ;
2014-05-12 07:48:50 +02:00
}
2014-06-26 20:02:01 +02:00
private void nUDSX_ValueChanged ( object sender , EventArgs e )
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
SXDeadzone [ device ] = ( double ) nUDSX . Value ;
2015-12-05 09:55:11 +01:00
pnlSATrack . Refresh ( ) ;
2014-06-26 20:02:01 +02:00
}
private void nUDSZ_ValueChanged ( object sender , EventArgs e )
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
SZDeadzone [ device ] = ( double ) nUDSZ . Value ;
2015-12-05 09:55:11 +01:00
pnlSATrack . Refresh ( ) ;
2015-04-21 21:00:09 +02:00
}
2015-12-05 09:55:11 +01:00
private void pnlSATrack_Paint ( object sender , PaintEventArgs e )
2015-04-21 21:00:09 +02:00
{
if ( nUDSX . Value > 0 | | nUDSZ . Value > 0 )
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
{
2015-04-21 21:00:09 +02:00
e . Graphics . FillEllipse ( Brushes . Red ,
( int ) ( dpix * 63 ) - ( int ) ( nUDSX . Value * 125 ) / 2 ,
( int ) ( dpix * 63 ) - ( int ) ( nUDSZ . Value * 125 ) / 2 ,
( int ) ( nUDSX . Value * 125 ) , ( int ) ( nUDSZ . Value * 125 ) ) ;
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
}
2014-06-26 20:02:01 +02:00
}
2014-05-21 23:42:25 +02:00
private void numUDRS_ValueChanged ( object sender , EventArgs e )
{
2015-04-21 21:00:09 +02:00
nUDRS . Value = Math . Round ( nUDRS . Value , 2 ) ;
2019-06-30 07:40:24 +02:00
RSModInfo [ device ] . deadZone = ( int ) Math . Round ( ( nUDRS . Value * 127 ) , 0 ) ;
2015-12-05 09:55:11 +01:00
pnlRSTrack . BackColor = nUDRS . Value > = 0 ? Color . White : Color . Red ;
pnlRSTrack . Refresh ( ) ;
2015-04-21 21:00:09 +02:00
}
2015-12-05 09:55:11 +01:00
private void pnlRSTrack_Paint ( object sender , PaintEventArgs e )
2015-04-21 21:00:09 +02:00
{
if ( nUDRS . Value > 0 )
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
{
2015-04-21 21:00:09 +02:00
int value = ( int ) ( nUDRS . Value * 125 ) ;
e . Graphics . FillEllipse ( Brushes . Red ,
( int ) ( dpix * 63 ) - value / 2 ,
( int ) ( dpix * 63 ) - value / 2 ,
value , value ) ;
}
else if ( nUDRS . Value < 0 )
{
int value = ( int ) ( ( 1 + nUDRS . Value ) * 125 ) ;
e . Graphics . FillEllipse ( Brushes . White ,
( int ) ( dpix * 63 ) - value / 2 ,
( int ) ( dpix * 63 ) - value / 2 ,
value , value ) ;
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
}
2014-05-21 23:42:25 +02:00
}
private void numUDLS_ValueChanged ( object sender , EventArgs e )
{
2015-04-21 21:00:09 +02:00
nUDLS . Value = Math . Round ( nUDLS . Value , 2 ) ;
2019-06-30 07:40:24 +02:00
LSModInfo [ device ] . deadZone = ( int ) Math . Round ( ( nUDLS . Value * 127 ) , 0 ) ;
2015-12-05 09:55:11 +01:00
pnlLSTrack . BackColor = nUDLS . Value > = 0 ? Color . White : Color . Red ;
pnlLSTrack . Refresh ( ) ;
2015-04-21 21:00:09 +02:00
}
2015-12-05 09:55:11 +01:00
private void pnlLSTrack_Paint ( object sender , PaintEventArgs e )
2015-04-21 21:00:09 +02:00
{
if ( nUDLS . Value > 0 )
{
int value = ( int ) ( nUDLS . Value * 125 ) ;
e . Graphics . FillEllipse ( Brushes . Red ,
( int ) ( dpix * 63 ) - value / 2 ,
( int ) ( dpix * 63 ) - value / 2 ,
value , value ) ;
}
else if ( nUDLS . Value < 0 )
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
{
2015-04-21 21:00:09 +02:00
int value = ( int ) ( ( 1 + nUDLS . Value ) * 125 ) ;
e . Graphics . FillEllipse ( Brushes . White ,
( int ) ( dpix * 63 ) - value / 2 ,
( int ) ( dpix * 63 ) - value / 2 ,
value , value ) ;
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
}
2014-05-21 23:42:25 +02:00
}
2014-05-24 04:30:43 +02:00
private void numUDMouseSens_ValueChanged ( object sender , EventArgs e )
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
ButtonMouseSensitivity [ device ] = ( int ) numUDMouseSens . Value ;
2014-05-24 04:30:43 +02:00
}
2014-05-25 01:08:40 +02:00
private void LightBar_MouseDown ( object sender , MouseEventArgs e )
{
2015-11-30 22:15:17 +01:00
if ( ! saving & & ! loading )
2019-09-24 22:15:58 +02:00
tp . Show ( ( ( TrackBar ) sender ) . Value . ToString ( ) , ( ( TrackBar ) sender ) , ( int ) ( 100 * dpix ) , 0 , 1000 ) ;
2014-05-25 01:08:40 +02:00
}
private void Lightbar_MouseUp ( object sender , MouseEventArgs e )
{
tp . Hide ( ( ( TrackBar ) sender ) ) ;
}
2014-05-30 22:39:39 +02:00
private void btnCancel_Click ( object sender , EventArgs e )
{
this . Close ( ) ;
}
2014-05-31 06:37:02 +02:00
private void nUDflashLED_ValueChanged ( object sender , EventArgs e )
{
if ( nUDflashLED . Value % 10 ! = 0 )
nUDflashLED . Value = Math . Round ( nUDflashLED . Value / 10 , 0 ) * 10 ;
2017-04-26 23:51:15 +02:00
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
FlashAt [ device ] = ( int ) nUDflashLED . Value ;
2014-05-31 06:37:02 +02:00
}
2014-06-02 19:29:38 +02:00
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
private void cBMouseAccel_CheckedChanged ( object sender , EventArgs e )
2014-06-24 00:27:14 +02:00
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
MouseAccel [ device ] = cBMouseAccel . Checked ;
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
}
2015-12-18 07:25:51 +01:00
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
private void tabControls_SelectedIndexChanged ( object sender , EventArgs e )
{
2017-04-07 03:16:12 +02:00
int index = tCControls . SelectedIndex ;
if ( index = = 2 )
2014-06-24 00:27:14 +02:00
sixaxisTimer . Start ( ) ;
else
sixaxisTimer . Stop ( ) ;
2017-04-07 03:16:12 +02:00
if ( index = = 1 )
{
actionTabSeen = true ;
}
2015-11-28 06:47:26 +01:00
}
2015-12-18 07:25:51 +01:00
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
private void DrawCircle ( object sender , PaintEventArgs e )
2014-06-26 20:02:01 +02:00
{
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
// Create pen.
Pen blackPen = new Pen ( Color . Red ) ;
// Create rectangle for ellipse.
Rectangle rect = new Rectangle ( 0 , 0 , ( ( PictureBox ) sender ) . Size . Width , ( ( PictureBox ) sender ) . Size . Height ) ;
// Draw ellipse to screen.
e . Graphics . DrawEllipse ( blackPen , rect ) ;
}
2014-07-26 01:17:45 +02:00
private void lbEmpty_Click ( object sender , EventArgs e )
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
{
2014-10-21 04:31:13 +02:00
tBLowRedBar . Value = tBRedBar . Value ;
tBLowGreenBar . Value = tBGreenBar . Value ;
tBLowBlueBar . Value = tBBlueBar . Value ;
2015-12-18 07:25:51 +01:00
}
2014-07-26 01:17:45 +02:00
private void lbSATip_Click ( object sender , EventArgs e )
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
{
2015-11-28 06:47:26 +01:00
//pnlSixaxis.Visible = !pnlSixaxis.Visible;
//btnSATrack.Visible = !btnSATrack.Visible;
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
}
private void SixaxisPanel_Click ( object sender , EventArgs e )
{
2014-07-26 01:17:45 +02:00
lbSATip_Click ( sender , e ) ;
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
}
2014-07-26 01:17:45 +02:00
private void lbSATrack_Click ( object sender , EventArgs e )
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
{
2014-07-26 01:17:45 +02:00
lbSATip_Click ( sender , e ) ;
}
2015-12-18 07:25:51 +01:00
2014-07-26 01:17:45 +02:00
private void btnBrowse_Click ( object sender , EventArgs e )
{
2017-05-20 12:38:12 +02:00
if ( openFileDialog1 . ShowDialog ( ) = = DialogResult . OK )
2014-07-26 01:17:45 +02:00
{
cBLaunchProgram . Checked = true ;
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
LaunchProgram [ device ] = openFileDialog1 . FileName ;
2014-07-26 01:17:45 +02:00
pBProgram . Image = Icon . ExtractAssociatedIcon ( openFileDialog1 . FileName ) . ToBitmap ( ) ;
btnBrowse . Text = Path . GetFileNameWithoutExtension ( openFileDialog1 . FileName ) ;
}
}
private void cBLaunchProgram_CheckedChanged ( object sender , EventArgs e )
{
if ( ! cBLaunchProgram . Checked )
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
LaunchProgram [ device ] = string . Empty ;
2014-07-26 01:17:45 +02:00
pBProgram . Image = null ;
2014-08-17 00:09:15 +02:00
btnBrowse . Text = Properties . Resources . Browse ;
2014-07-26 01:17:45 +02:00
}
2014-06-26 20:02:01 +02:00
}
2014-08-23 22:52:20 +02:00
2018-03-21 23:31:22 +01:00
private void CBDinput_CheckedChanged ( object sender , EventArgs e )
2014-08-23 22:52:20 +02:00
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
DinputOnly [ device ] = cBDinput . Checked ;
2014-08-23 22:52:20 +02:00
}
2014-09-15 04:37:14 +02:00
private void cbStartTouchpadOff_CheckedChanged ( object sender , EventArgs e )
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
StartTouchpadOff [ device ] = cbStartTouchpadOff . Checked ;
2014-09-15 04:37:14 +02:00
}
2015-11-28 06:47:26 +01:00
2014-09-15 04:37:14 +02:00
private void Items_MouseHover ( object sender , EventArgs e )
{
2015-11-28 06:47:26 +01:00
string name = ( ( Control ) sender ) . Name ;
2015-12-13 22:30:54 +01:00
if ( name . Contains ( "btn" ) & & ! name . Contains ( "Flash" ) & & ! name . Contains ( "Stick" ) & & ! name . Contains ( "Rainbow" ) )
2015-11-28 06:47:26 +01:00
name = name . Remove ( 1 , 1 ) ;
2017-04-26 23:51:15 +02:00
2015-11-28 06:47:26 +01:00
switch ( name )
2014-09-15 04:37:14 +02:00
{
case "cBlowerRCOn" : root . lbLastMessage . Text = Properties . Resources . BestUsedRightSide ; break ;
case "cBDoubleTap" : root . lbLastMessage . Text = Properties . Resources . TapAndHold ; break ;
case "lbControlTip" : root . lbLastMessage . Text = Properties . Resources . UseControllerForMapping ; break ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
case "cBTouchpadJitterCompensation" : root . lbLastMessage . Text = Properties . Resources . Jitter ; break ;
2015-12-13 22:30:54 +01:00
case "btnRainbow" : root . lbLastMessage . Text = Properties . Resources . AlwaysRainbow ; break ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
case "cBFlushHIDQueue" : root . lbLastMessage . Text = Properties . Resources . FlushHIDTip ; break ;
case "cBLightbyBattery" : root . lbLastMessage . Text = Properties . Resources . LightByBatteryTip ; break ;
case "lbGryo" : root . lbLastMessage . Text = Properties . Resources . GyroReadout ; break ;
case "tBsixaxisGyroX" : root . lbLastMessage . Text = Properties . Resources . GyroX ; break ;
case "tBsixaxisGyroY" : root . lbLastMessage . Text = Properties . Resources . GyroY ; break ;
case "tBsixaxisGyroZ" : root . lbLastMessage . Text = Properties . Resources . GyroZ ; break ;
2014-09-15 04:37:14 +02:00
case "tBsixaxisAccelX" : root . lbLastMessage . Text = "AccelX" ; break ;
case "tBsixaxisAccelY" : root . lbLastMessage . Text = "AccelY" ; break ;
case "tBsixaxisAccelZ" : root . lbLastMessage . Text = "AccelZ" ; break ;
case "lbEmpty" : root . lbLastMessage . Text = Properties . Resources . CopyFullColor ; break ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
case "lbSATip" : root . lbLastMessage . Text = Properties . Resources . SixAxisReading ; break ;
2014-09-15 04:37:14 +02:00
case "cBDinput" : root . lbLastMessage . Text = Properties . Resources . DinputOnly ; break ;
2015-02-08 22:51:52 +01:00
case "btnFlashColor" : root . lbLastMessage . Text = Properties . Resources . FlashAtTip ; break ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
case "cbStartTouchpadOff" : root . lbLastMessage . Text = Properties . Resources . TouchpadOffTip ; break ;
case "cBTPforControls" : root . lbLastMessage . Text = Properties . Resources . UsingTPSwipes ; break ;
2014-12-17 19:29:22 +01:00
case "bnUp" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "bnLeft" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "bnRight" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "bnDown" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
2015-11-28 06:47:26 +01:00
case "btnLS" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "btnRS" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
2014-12-17 19:29:22 +01:00
case "bnCross" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "bnCircle" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "bnSquare" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "bnTriangle" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "lbGyro" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "bnGyroZN" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "bnGyroZP" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "bnGyroXN" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "bnGyroXP" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "lbTPSwipes" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "bnSwipeUp" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "bnSwipeLeft" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "bnSwipeRight" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
2017-05-05 03:12:44 +02:00
case "bnSwipeDown" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "bnL3" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
case "bnR3" : root . lbLastMessage . Text = Properties . Resources . RightClickPresets ; break ;
2017-05-17 08:02:12 +02:00
case "btPollRateLabel" : root . lbLastMessage . Text = Properties . Resources . BTPollRate ; break ;
case "btPollRateComboBox" : root . lbLastMessage . Text = Properties . Resources . BTPollRate ; break ;
2019-04-26 04:21:24 +02:00
case "outcontLb" : root . lbLastMessage . Text = Properties . Resources . OutContNotice ; break ;
case "OutContTypeCb" : root . lbLastMessage . Text = Properties . Resources . OutContNotice ; break ;
2017-05-21 04:00:23 +02:00
case "nUDSixaxis" : root . lbLastMessage . Text = Properties . Resources . UseControllerForMapping ; break ;
2019-05-20 02:54:11 +02:00
case "enableTouchToggleCheckbox" : root . lbLastMessage . Text = Properties . Resources . EnableTouchToggle ; break ;
2017-05-21 04:00:23 +02:00
case "cBControllerInput" : root . lbLastMessage . Text = Properties . Resources . UseControllerForMapping ; break ;
case "lbUseController" : root . lbLastMessage . Text = Properties . Resources . UseControllerForMapping ; break ;
2017-06-24 11:52:39 +02:00
case "gyroTriggerBehavior" : root . lbLastMessage . Text = Properties . Resources . GyroTriggerBehavior ; break ;
2017-05-05 03:12:44 +02:00
default : root . lbLastMessage . Text = Properties . Resources . HoverOverItems ; break ;
2015-12-18 07:25:51 +01:00
}
2017-04-26 23:51:15 +02:00
2015-12-18 07:25:51 +01:00
if ( name . Contains ( "bnLS" ) | | name . Contains ( "bnRS" ) )
2015-11-28 06:47:26 +01:00
root . lbLastMessage . Text = Properties . Resources . RightClickPresets ;
2017-04-26 23:51:15 +02:00
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
if ( root . lbLastMessage . Text ! = Properties . Resources . HoverOverItems )
2014-09-15 04:37:14 +02:00
root . lbLastMessage . ForeColor = Color . Black ;
else
root . lbLastMessage . ForeColor = SystemColors . GrayText ;
}
2014-11-15 22:54:14 +01:00
private void cBTPforControls_CheckedChanged ( object sender , EventArgs e )
{
2015-11-28 06:47:26 +01:00
UseTPforControls [ device ] = rBTPControls . Checked ;
pnlTPMouse . Visible = rBTPMouse . Checked ;
2015-12-18 07:25:51 +01:00
fLPTouchSwipe . Visible = rBTPControls . Checked ;
if ( rBTPControls . Checked & & lBControls . Items . Count < = 33 )
2014-11-15 22:54:14 +01:00
{
2015-11-28 06:47:26 +01:00
lBControls . Items . AddRange ( new string [ 4 ] { "t" , "t" , "t" , "t" } ) ;
UpdateLists ( ) ;
2014-11-15 22:54:14 +01:00
}
2015-12-18 07:25:51 +01:00
else if ( rBTPMouse . Checked & & lBControls . Items . Count > 33 )
2014-11-15 22:54:14 +01:00
{
2017-08-23 04:13:01 +02:00
lBControls . BeginUpdate ( ) ;
2014-11-15 22:54:14 +01:00
lBControls . Items . RemoveAt ( 36 ) ;
lBControls . Items . RemoveAt ( 35 ) ;
lBControls . Items . RemoveAt ( 34 ) ;
lBControls . Items . RemoveAt ( 33 ) ;
2017-08-23 04:13:01 +02:00
lBControls . EndUpdate ( ) ;
2014-11-15 22:54:14 +01:00
}
}
2014-11-20 20:03:18 +01:00
private void cBControllerInput_CheckedChanged ( object sender , EventArgs e )
{
2017-05-20 12:38:12 +02:00
DS4Mapping = cBControllerInput . Checked ;
2014-11-20 20:03:18 +01:00
}
2014-12-13 21:12:03 +01:00
private void btnAddAction_Click ( object sender , EventArgs e )
{
SpecActions sA = new SpecActions ( this ) ;
sA . TopLevel = false ;
sA . Dock = DockStyle . Fill ;
sA . Visible = true ;
tPSpecial . Controls . Add ( sA ) ;
sA . BringToFront ( ) ;
}
private void btnEditAction_Click ( object sender , EventArgs e )
{
if ( lVActions . SelectedIndices . Count > 0 & & lVActions . SelectedIndices [ 0 ] > = 0 )
{
SpecActions sA = new SpecActions ( this , lVActions . SelectedItems [ 0 ] . Text , lVActions . SelectedIndices [ 0 ] ) ;
sA . TopLevel = false ;
sA . Dock = DockStyle . Fill ;
sA . Visible = true ;
tPSpecial . Controls . Add ( sA ) ;
sA . BringToFront ( ) ;
}
}
private void btnRemAction_Click ( object sender , EventArgs e )
{
if ( lVActions . SelectedIndices . Count > 0 & & lVActions . SelectedIndices [ 0 ] > = 0 )
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
RemoveAction ( lVActions . SelectedItems [ 0 ] . Text ) ;
2014-12-13 21:12:03 +01:00
lVActions . Items . Remove ( lVActions . SelectedItems [ 0 ] ) ;
2017-05-08 16:29:38 +02:00
calculateProfileActionCount ( device ) ;
calculateProfileActionDicts ( device ) ;
cacheProfileCustomsFlags ( device ) ;
2014-12-13 21:12:03 +01:00
}
}
private void nUDLSCurve_ValueChanged ( object sender , EventArgs e )
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
LSCurve [ device ] = ( int ) Math . Round ( nUDLSCurve . Value , 0 ) ;
2014-12-13 21:12:03 +01:00
}
private void nUDRSCurve_ValueChanged ( object sender , EventArgs e )
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
RSCurve [ device ] = ( int ) Math . Round ( nUDRSCurve . Value , 0 ) ;
2014-12-13 21:12:03 +01:00
}
2014-12-17 19:29:22 +01:00
private void cMSPresets_Opened ( object sender , EventArgs e )
{
string name = cMSPresets . SourceControl . Name ;
2015-11-28 06:47:26 +01:00
if ( name . Contains ( "btn" ) & & ! name . Contains ( "Stick" ) )
name = name . Remove ( 1 , 1 ) ;
2017-04-26 23:51:15 +02:00
2014-12-17 19:29:22 +01:00
if ( name = = "bnUp" | | name = = "bnLeft" | | name = = "bnRight" | | name = = "bnDown" )
controlToolStripMenuItem . Text = "Dpad" ;
2015-11-30 22:15:17 +01:00
else if ( name = = "btnLeftStick" | | name . Contains ( "bnLS" ) | | name . Contains ( "bnL3" ) )
2014-12-17 19:29:22 +01:00
controlToolStripMenuItem . Text = "Left Stick" ;
2015-11-30 22:15:17 +01:00
else if ( name = = "btnRightStick" | | name . Contains ( "bnRS" ) | | name . Contains ( "bnR3" ) )
2014-12-17 19:29:22 +01:00
controlToolStripMenuItem . Text = "Right Stick" ;
else if ( name = = "bnCross" | | name = = "bnCircle" | | name = = "bnSquare" | | name = = "bnTriangle" )
controlToolStripMenuItem . Text = "Face Buttons" ;
else if ( name = = "lbGyro" | | name . StartsWith ( "bnGyro" ) )
controlToolStripMenuItem . Text = "Sixaxis" ;
else if ( name = = "lbTPSwipes" | | name . StartsWith ( "bnSwipe" ) )
controlToolStripMenuItem . Text = "Touchpad Swipes" ;
else
controlToolStripMenuItem . Text = "Select another control" ;
2017-04-26 23:51:15 +02:00
2015-12-18 07:25:51 +01:00
MouseToolStripMenuItem . Visible = ! ( name = = "lbTPSwipes" | | name . StartsWith ( "bnSwipe" ) ) ;
2014-12-17 19:29:22 +01:00
}
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
private void SetPreset ( object sender , EventArgs e )
2014-12-17 19:29:22 +01:00
{
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
bool scancode = false ;
2014-12-17 19:29:22 +01:00
KeyValuePair < object , string > tagU ;
KeyValuePair < object , string > tagL ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
KeyValuePair < object , string > tagR ;
2014-12-17 19:29:22 +01:00
KeyValuePair < object , string > tagD ;
2017-04-26 23:51:15 +02:00
KeyValuePair < object , string > tagM = new KeyValuePair < object , string > ( null , "0,0,0,0,0,0,0,0" ) ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
string name = ( ( ToolStripMenuItem ) sender ) . Name ;
if ( name . Contains ( "Dpad" ) | | name . Contains ( "DPad" ) )
2014-12-17 19:29:22 +01:00
{
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
if ( name . Contains ( "InvertedX" ) )
{
2014-12-17 19:29:22 +01:00
tagU = new KeyValuePair < object , string > ( "Up Button" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "Right Button" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "Left Button" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "Down Button" , "0,0,0,0,0,0,0,0" ) ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
}
else if ( name . Contains ( "InvertedY" ) )
{
2014-12-17 19:29:22 +01:00
tagU = new KeyValuePair < object , string > ( "Down Button" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "Left Button" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "Right Button" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "Up Button" , "0,0,0,0,0,0,0,0" ) ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
}
else if ( name . Contains ( "Inverted" ) )
{
tagU = new KeyValuePair < object , string > ( "Down Button" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "Right Button" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "Left Button" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "Up Button" , "0,0,0,0,0,0,0,0" ) ;
}
else
{
2014-12-17 19:29:22 +01:00
tagU = new KeyValuePair < object , string > ( "Up Button" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "Left Button" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "Right Button" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "Down Button" , "0,0,0,0,0,0,0,0" ) ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
}
}
else if ( name . Contains ( "LS" ) )
{
if ( name . Contains ( "InvertedX" ) )
{
tagU = new KeyValuePair < object , string > ( "Left Y-Axis-" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "Left X-Axis+" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "Left X-Axis-" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "Left Y-Axis+" , "0,0,0,0,0,0,0,0" ) ;
}
else if ( name . Contains ( "InvertedY" ) )
{
tagU = new KeyValuePair < object , string > ( "Left Y-Axis+" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "Left X-Axis-" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "Left X-Axis+" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "Left Y-Axis-" , "0,0,0,0,0,0,0,0" ) ;
}
else if ( name . Contains ( "Inverted" ) )
{
tagU = new KeyValuePair < object , string > ( "Left Y-Axis+" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "Left X-Axis+" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "Left X-Axis-" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "Left Y-Axis-" , "0,0,0,0,0,0,0,0" ) ;
}
else
{
tagU = new KeyValuePair < object , string > ( "Left Y-Axis-" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "Left X-Axis-" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "Left X-Axis+" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "Left Y-Axis+" , "0,0,0,0,0,0,0,0" ) ;
}
2015-11-30 22:15:17 +01:00
tagM = new KeyValuePair < object , string > ( "Left Stick" , "0,0,0,0,0,0,0,0" ) ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
}
else if ( name . Contains ( "RS" ) )
{
if ( name . Contains ( "InvertedX" ) )
{
tagU = new KeyValuePair < object , string > ( "Right Y-Axis-" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "Right X-Axis+" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "Right X-Axis-" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "Right Y-Axis+" , "0,0,0,0,0,0,0,0" ) ;
}
else if ( name . Contains ( "InvertedY" ) )
{
tagU = new KeyValuePair < object , string > ( "Right Y-Axis+" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "Right X-Axis-" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "Right X-Axis+" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "Right Y-Axis-" , "0,0,0,0,0,0,0,0" ) ;
}
else if ( name . Contains ( "Inverted" ) )
{
tagU = new KeyValuePair < object , string > ( "Right Y-Axis+" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "Right X-Axis+" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "Right X-Axis-" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "Right Y-Axis-" , "0,0,0,0,0,0,0,0" ) ;
}
else
{
tagU = new KeyValuePair < object , string > ( "Right Y-Axis-" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "Right X-Axis-" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "Right X-Axis+" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "Right Y-Axis+" , "0,0,0,0,0,0,0,0" ) ;
}
2015-11-30 22:15:17 +01:00
tagM = new KeyValuePair < object , string > ( "Right Stick" , "0,0,0,0,0,0,0,0" ) ;
2014-12-17 19:29:22 +01:00
}
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
else if ( name . Contains ( "ABXY" ) )
{
tagU = new KeyValuePair < object , string > ( "Y Button" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "X Button" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "B Button" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "A Button" , "0,0,0,0,0,0,0,0" ) ;
}
else if ( name . Contains ( "WASD" ) )
{
if ( name . Contains ( "ScanCode" ) )
scancode = true ;
tagU = new KeyValuePair < object , string > ( ( int ) Keys . W , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( ( int ) Keys . A , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( ( int ) Keys . D , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( ( int ) Keys . S , "0,0,0,0,0,0,0,0" ) ;
}
else if ( name . Contains ( "ArrowKeys" ) )
{
if ( name . Contains ( "ScanCode" ) )
scancode = true ;
tagU = new KeyValuePair < object , string > ( ( int ) Keys . Up , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( ( int ) Keys . Left , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( ( int ) Keys . Right , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( ( int ) Keys . Down , "0,0,0,0,0,0,0,0" ) ;
}
else if ( name . Contains ( "Mouse" ) )
{
if ( name . Contains ( "InvertedX" ) )
{
tagU = new KeyValuePair < object , string > ( "Mouse Up" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "Mouse Right" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "Mouse Left" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "Mouse Down" , "0,0,0,0,0,0,0,0" ) ;
}
else if ( name . Contains ( "InvertedY" ) )
{
tagU = new KeyValuePair < object , string > ( "Mouse Down" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "Mouse Left" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "Mouse Right" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "Mouse Up" , "0,0,0,0,0,0,0,0" ) ;
}
else if ( name . Contains ( "Inverted" ) )
{
tagU = new KeyValuePair < object , string > ( "Mouse Down" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "Mouse Right" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "Mouse Left" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "Mouse Up" , "0,0,0,0,0,0,0,0" ) ;
}
else
{
tagU = new KeyValuePair < object , string > ( "Mouse Up" , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( "Mouse Left" , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( "Mouse Right" , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( "Mouse Down" , "0,0,0,0,0,0,0,0" ) ;
}
}
else //default
{
tagU = new KeyValuePair < object , string > ( null , "0,0,0,0,0,0,0,0" ) ;
tagL = new KeyValuePair < object , string > ( null , "0,0,0,0,0,0,0,0" ) ;
tagR = new KeyValuePair < object , string > ( null , "0,0,0,0,0,0,0,0" ) ;
tagD = new KeyValuePair < object , string > ( null , "0,0,0,0,0,0,0,0" ) ;
}
2015-11-30 22:15:17 +01:00
Button button1 , button2 , button3 , button4 , button5 = null ;
2017-04-26 23:51:15 +02:00
string toolStripMenuText = controlToolStripMenuItem . Text ;
if ( toolStripMenuText = = "Dpad" )
2014-12-17 19:29:22 +01:00
{
button1 = bnUp ;
button2 = bnLeft ;
button3 = bnRight ;
button4 = bnDown ;
}
2017-04-26 23:51:15 +02:00
else if ( toolStripMenuText = = "Left Stick" )
2014-12-17 19:29:22 +01:00
{
button1 = bnLSUp ;
button2 = bnLSLeft ;
button3 = bnLSRight ;
button4 = bnLSDown ;
2015-11-30 22:15:17 +01:00
button5 = bnL3 ;
2014-12-17 19:29:22 +01:00
}
2017-04-26 23:51:15 +02:00
else if ( toolStripMenuText = = "Right Stick" )
2014-12-17 19:29:22 +01:00
{
button1 = bnRSUp ;
button2 = bnRSLeft ;
button3 = bnRSRight ;
button4 = bnRSDown ;
2015-11-30 22:15:17 +01:00
button5 = bnR3 ;
2014-12-17 19:29:22 +01:00
}
2017-04-26 23:51:15 +02:00
else if ( toolStripMenuText = = "Face Buttons" )
2014-12-17 19:29:22 +01:00
{
button1 = bnTriangle ;
button2 = bnSquare ;
button3 = bnCircle ;
button4 = bnCross ;
}
2017-04-26 23:51:15 +02:00
else if ( toolStripMenuText = = "Sixaxis" )
2014-12-17 19:29:22 +01:00
{
button1 = bnGyroZN ;
button2 = bnGyroXP ;
button3 = bnGyroXN ;
button4 = bnGyroZP ;
}
2017-04-26 23:51:15 +02:00
else if ( toolStripMenuText = = "Touchpad Swipes" )
2014-12-17 19:29:22 +01:00
{
button1 = bnSwipeUp ;
button2 = bnSwipeLeft ;
button3 = bnSwipeRight ;
button4 = bnSwipeDown ;
}
else
button1 = button2 = button3 = button4 = null ;
2017-04-26 23:51:15 +02:00
2015-12-18 07:25:51 +01:00
ChangeButtonText ( tagU , button1 , scancode ) ;
ChangeButtonText ( tagL , button2 , scancode ) ;
ChangeButtonText ( tagR , button3 , scancode ) ;
ChangeButtonText ( tagD , button4 , scancode ) ;
2015-11-30 22:15:17 +01:00
if ( tagM . Key ! = null & & button5 ! = null )
2015-12-18 07:25:51 +01:00
ChangeButtonText ( tagM , button5 , scancode ) ;
//BatchToggle_Bn(scancode, button1, button2, button3, button4);
2014-12-17 19:29:22 +01:00
UpdateLists ( ) ;
cMSPresets . Hide ( ) ;
}
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
private void cBWhileCharging_SelectedIndexChanged ( object sender , EventArgs e )
2014-12-17 19:29:22 +01:00
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
ChargingType [ device ] = cBWhileCharging . SelectedIndex ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
btnChargingColor . Visible = cBWhileCharging . SelectedIndex = = 3 ;
2014-12-17 19:29:22 +01:00
}
2015-02-08 22:51:52 +01:00
private void btnFlashColor_Click ( object sender , EventArgs e )
{
2015-11-28 06:47:26 +01:00
if ( btnFlashColor . BackColor ! = main )
2015-02-08 22:51:52 +01:00
advColorDialog . Color = btnFlashColor . BackColor ;
else
advColorDialog . Color = Color . Black ;
2017-04-26 23:51:15 +02:00
2019-03-23 07:27:05 +01:00
advColorDialog . FullOpen = true ;
2015-02-08 22:51:52 +01:00
advColorDialog_OnUpdateColor ( lbPercentFlashBar . ForeColor , e ) ;
2019-03-23 07:27:05 +01:00
advColorDialog . OnUpdateColor + = advColorDialog_OnUpdateColor ;
2015-02-08 22:51:52 +01:00
if ( advColorDialog . ShowDialog ( ) = = DialogResult . OK )
{
if ( advColorDialog . Color . GetBrightness ( ) > 0 )
btnFlashColor . BackColor = advColorDialog . Color ;
else
2015-11-28 06:47:26 +01:00
btnFlashColor . BackColor = main ;
2017-04-26 23:51:15 +02:00
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
FlashColor [ device ] = new DS4Color ( advColorDialog . Color ) ;
2015-02-08 22:51:52 +01:00
}
2017-04-26 23:51:15 +02:00
2019-03-23 07:44:03 +01:00
advColorDialog . OnUpdateColor - = advColorDialog_OnUpdateColor ;
2015-02-08 22:51:52 +01:00
if ( device < 4 )
DS4LightBar . forcelight [ device ] = false ;
}
2019-08-23 05:03:03 +02:00
/ * private void useSAforMouse_CheckedChanged ( object sender , EventArgs e )
2015-02-08 22:51:52 +01:00
{
2015-11-28 06:47:26 +01:00
UseSAforMouse [ device ] = rBSAMouse . Checked ;
pnlSAMouse . Visible = rBSAMouse . Checked ;
2015-12-18 07:25:51 +01:00
fLPTiltControls . Visible = rBSAControls . Checked ;
2015-11-28 06:47:26 +01:00
}
2019-08-23 05:03:03 +02:00
* /
2015-11-28 06:47:26 +01:00
private void btnGyroTriggers_Click ( object sender , EventArgs e )
{
2017-08-05 05:36:46 +02:00
Control button = ( Control ) sender ;
cMGyroTriggers . Show ( button , new Point ( 0 , button . Height ) ) ;
2015-02-08 22:51:52 +01:00
}
2015-11-28 06:47:26 +01:00
private void SATrigger_CheckedChanged ( object sender , EventArgs e )
2015-02-08 22:51:52 +01:00
{
2017-08-05 05:36:46 +02:00
if ( loading = = false )
2017-04-26 23:51:15 +02:00
{
2017-08-05 05:36:46 +02:00
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
2015-11-28 06:47:26 +01:00
{
2017-08-05 05:36:46 +02:00
for ( int i = 0 ; i < gyroTriggerCount - 1 ; i + + )
( ( ToolStripMenuItem ) cMGyroTriggers . Items [ i ] ) . Checked = false ;
2015-11-28 06:47:26 +01:00
}
2017-04-26 23:51:15 +02:00
2017-08-05 05:36:46 +02:00
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 ) ;
}
}
2017-04-26 23:51:15 +02:00
2017-08-05 05:36:46 +02:00
if ( ints . Count = = 0 )
{
ints . Add ( - 1 ) ;
s . Add ( cMGyroTriggers . Items [ gyroTriggerCount - 1 ] . Text ) ;
}
2019-08-23 05:03:03 +02:00
int gyroOutIdx = gyroOutputMode . SelectedIndex ;
if ( gyroOutIdx = = 1 )
{
SATriggers [ device ] = string . Join ( "," , ints ) ;
if ( s . Count > 0 )
btnGyroTriggers . Text = string . Join ( ", " , s ) ;
}
else if ( gyroOutIdx = = 2 )
{
SAMousestickTriggers [ device ] = string . Join ( "," , ints ) ;
if ( s . Count > 0 )
btnGyroMStickTrig . Text = string . Join ( ", " , s ) ;
}
2017-08-05 05:36:46 +02:00
}
2015-02-08 22:51:52 +01:00
}
2015-11-28 06:47:26 +01:00
private void cBGyroInvert_CheckChanged ( object sender , EventArgs e )
{
int invert = 0 ;
if ( cBGyroInvertX . Checked )
invert + = 2 ;
2017-04-26 23:51:15 +02:00
2015-11-28 06:47:26 +01:00
if ( cBGyroInvertY . Checked )
invert + = 1 ;
2017-04-26 23:51:15 +02:00
2015-11-28 06:47:26 +01:00
GyroInvert [ device ] = invert ;
}
2015-11-30 22:15:17 +01:00
private void btnLightbar_MouseHover ( object sender , EventArgs e )
{
lbControlName . Text = lbControlTip . Text ;
}
2017-03-27 05:55:05 +02:00
private void nUDLSAntiDead_ValueChanged ( object sender , EventArgs e )
{
2019-06-30 07:40:24 +02:00
LSModInfo [ device ] . antiDeadZone = ( int ) ( nUDLSAntiDead . Value * 100 ) ;
2017-03-27 05:55:05 +02:00
}
private void nUDRSAntiDead_ValueChanged ( object sender , EventArgs e )
{
2019-06-30 07:40:24 +02:00
RSModInfo [ device ] . antiDeadZone = ( int ) ( nUDRSAntiDead . Value * 100 ) ;
2017-03-30 09:37:01 +02:00
}
private void nUDL2AntiDead_ValueChanged ( object sender , EventArgs e )
{
2019-07-01 03:59:51 +02:00
L2ModInfo [ device ] . antiDeadZone = ( int ) ( nUDL2AntiDead . Value * 100 ) ;
2017-03-30 09:37:01 +02:00
}
private void nUDR2AntiDead_ValueChanged ( object sender , EventArgs e )
{
2019-07-01 03:59:51 +02:00
R2ModInfo [ device ] . antiDeadZone = ( int ) ( nUDR2AntiDead . Value * 100 ) ;
2017-03-27 05:55:05 +02:00
}
2017-04-07 03:16:12 +02:00
private void lVActions_ItemCheck ( object sender , ItemCheckEventArgs e )
{
2017-05-20 12:38:12 +02:00
if ( actionTabSeen )
2017-04-07 03:16:12 +02:00
{
List < string > pactions = new List < string > ( ) ;
foreach ( ListViewItem lvi in lVActions . Items )
2017-05-02 17:00:54 +02:00
{
2017-04-07 03:16:12 +02:00
if ( lvi ! = null & & lvi . Checked )
pactions . Add ( lvi . Text ) ;
2017-05-02 17:00:54 +02:00
}
2017-04-07 03:16:12 +02:00
ProfileActions [ device ] = pactions ;
calculateProfileActionCount ( device ) ;
calculateProfileActionDicts ( device ) ;
2017-05-08 16:29:38 +02:00
cacheProfileCustomsFlags ( device ) ;
2017-04-07 03:16:12 +02:00
}
}
2017-04-26 23:51:15 +02:00
private void enableTouchToggleCheckbox_CheckedChanged ( object sender , EventArgs e )
2017-04-26 21:43:01 +02:00
{
2017-04-26 23:51:15 +02:00
EnableTouchToggle [ device ] = enableTouchToggleCheckbox . Checked ;
2017-04-26 21:43:01 +02:00
}
2017-05-05 18:13:12 +02:00
private void nUDRSMaxZone_ValueChanged ( object sender , EventArgs e )
{
2019-06-30 07:40:24 +02:00
RSModInfo [ device ] . maxZone = ( int ) ( nUDRSMaxZone . Value * 100 ) ;
2017-05-05 18:13:12 +02:00
}
private void nUDLSMaxZone_ValueChanged ( object sender , EventArgs e )
{
2019-06-30 07:40:24 +02:00
LSModInfo [ device ] . maxZone = ( int ) ( nUDLSMaxZone . Value * 100 ) ;
2017-05-05 18:13:12 +02:00
}
private void nUDL2Maxzone_ValueChanged ( object sender , EventArgs e )
{
2019-07-01 03:59:51 +02:00
L2ModInfo [ device ] . maxZone = ( int ) ( nUDL2Maxzone . Value * 100 ) ;
2017-05-05 18:13:12 +02:00
}
private void nUDR2Maxzone_ValueChanged ( object sender , EventArgs e )
{
2019-07-01 03:59:51 +02:00
R2ModInfo [ device ] . maxZone = ( int ) ( nUDR2Maxzone . Value * 100 ) ;
2017-05-05 18:13:12 +02:00
}
2017-05-17 08:02:12 +02:00
private void btPollRateComboBox_SelectedIndexChanged ( object sender , EventArgs e )
{
int currentIndex = btPollRateComboBox . SelectedIndex ;
BTPollRate [ device ] = currentIndex ;
}
2017-05-20 06:59:47 +02:00
private void nUDL2Sens_ValueChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
L2Sens [ device ] = ( double ) nUDL2S . Value ;
}
}
private void nUDLSSens_ValueChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
LSSens [ device ] = ( double ) nUDLSS . Value ;
}
}
private void nUDR2Sens_ValueChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
R2Sens [ device ] = ( double ) nUDR2S . Value ;
}
}
private void nUDRSSens_ValueChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
RSSens [ device ] = ( double ) nUDRSS . Value ;
}
}
private void nUDSXSens_ValueChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
SXSens [ device ] = ( double ) nUDSXS . Value ;
}
}
private void nUDSZSens_ValueChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
SZSens [ device ] = ( double ) nUDSZS . Value ;
}
}
2017-06-08 09:37:04 +02:00
private void lsOutCurveComboBox_SelectedIndexChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
2019-07-25 21:54:39 +02:00
bool customIdx = lsOutCurveComboBox . SelectedIndex = = lsOutCurveComboBox . Items . Count - 1 ;
2019-09-08 00:11:10 +02:00
if ( customIdx )
2019-07-17 22:20:38 +02:00
setLsOutCurveMode ( device , lsOutCurveComboBox . SelectedIndex ) ;
2019-09-08 00:11:10 +02:00
tBLSCustomOutputCurve . Enabled = BtnLSCurveEditor . Enabled = customIdx ;
tBLSCustomOutputCurve . Text = ( customIdx ? lsOutBezierCurveObj [ device ] . ToString ( ) : "" ) ;
2017-06-08 09:37:04 +02:00
}
}
private void rsOutCurveComboBox_SelectedIndexChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
2019-07-25 21:54:39 +02:00
bool customIdx = rsOutCurveComboBox . SelectedIndex = = rsOutCurveComboBox . Items . Count - 1 ;
2019-09-08 00:11:10 +02:00
if ( customIdx )
2019-07-17 22:20:38 +02:00
setRsOutCurveMode ( device , rsOutCurveComboBox . SelectedIndex ) ;
2019-09-08 00:11:10 +02:00
tBRSCustomOutputCurve . Enabled = btnRSCurveEditor . Enabled = customIdx ;
2019-09-03 14:21:53 +02:00
tBRSCustomOutputCurve . Text = ( customIdx ? rsOutBezierCurveObj [ device ] . ToString ( ) : "" ) ;
2017-06-08 09:37:04 +02:00
}
}
2019-09-08 00:11:10 +02:00
private void cBL2OutputCurve_SelectedIndexChanged ( object sender , EventArgs e )
2019-07-25 21:54:39 +02:00
{
2019-09-08 00:11:10 +02:00
if ( loading = = false )
2019-07-25 21:54:39 +02:00
{
2019-09-08 00:11:10 +02:00
bool customIdx = cBL2OutputCurve . SelectedIndex = = cBL2OutputCurve . Items . Count - 1 ;
if ( customIdx )
setL2OutCurveMode ( device , cBL2OutputCurve . SelectedIndex ) ;
2019-07-25 21:54:39 +02:00
2019-09-08 00:11:10 +02:00
tBL2CustomOutputCurve . Enabled = btnL2CurveEditor . Enabled = customIdx ;
2019-09-03 14:21:53 +02:00
tBL2CustomOutputCurve . Text = ( tBL2CustomOutputCurve . Enabled ? l2OutBezierCurveObj [ device ] . ToString ( ) : "" ) ;
2019-07-25 21:54:39 +02:00
}
2019-09-08 00:11:10 +02:00
}
2019-07-25 21:54:39 +02:00
2019-09-08 00:11:10 +02:00
private void cBR2OutputCurve_SelectedIndexChanged ( object sender , EventArgs e )
{
if ( loading = = false )
2019-07-25 21:54:39 +02:00
{
2019-09-08 00:11:10 +02:00
bool customIdx = cBR2OutputCurve . SelectedIndex = = cBR2OutputCurve . Items . Count - 1 ;
if ( customIdx )
setR2OutCurveMode ( device , cBR2OutputCurve . SelectedIndex ) ;
tBR2CustomOutputCurve . Enabled = btnR2CurveEditor . Enabled = customIdx ;
2019-09-03 14:21:53 +02:00
tBR2CustomOutputCurve . Text = ( tBR2CustomOutputCurve . Enabled ? r2OutBezierCurveObj [ device ] . ToString ( ) : "" ) ;
2019-07-25 21:54:39 +02:00
}
2019-09-08 00:11:10 +02:00
}
2019-07-25 21:54:39 +02:00
2019-09-08 00:11:10 +02:00
private void cBSixaxisXOutputCurve_SelectedIndexChanged ( object sender , EventArgs e )
{
if ( loading = = false )
2019-07-25 21:54:39 +02:00
{
2019-09-08 00:11:10 +02:00
bool customIdx = cBSixaxisXOutputCurve . SelectedIndex = = cBSixaxisXOutputCurve . Items . Count - 1 ;
if ( customIdx )
setSXOutCurveMode ( device , cBSixaxisXOutputCurve . SelectedIndex ) ;
tBSixXCustomOutputCurve . Enabled = btnSixXCurveEditor . Enabled = customIdx ;
2019-09-03 14:21:53 +02:00
tBSixXCustomOutputCurve . Text = ( tBSixXCustomOutputCurve . Enabled ? sxOutBezierCurveObj [ device ] . ToString ( ) : "" ) ;
2019-07-25 21:54:39 +02:00
}
2019-09-08 00:11:10 +02:00
}
2019-07-25 21:54:39 +02:00
2019-09-08 00:11:10 +02:00
private void cBSixaxisZOutputCurve_SelectedIndexChanged ( object sender , EventArgs e )
{
if ( loading = = false )
2019-07-25 21:54:39 +02:00
{
2019-09-08 00:11:10 +02:00
bool customIdx = cBSixaxisZOutputCurve . SelectedIndex = = cBSixaxisZOutputCurve . Items . Count - 1 ;
if ( customIdx )
setSZOutCurveMode ( device , cBSixaxisZOutputCurve . SelectedIndex ) ;
tBSixZCustomOutputCurve . Enabled = btnSixZCurveEditor . Enabled = customIdx ;
2019-09-03 14:21:53 +02:00
tBSixZCustomOutputCurve . Text = ( tBSixZCustomOutputCurve . Enabled ? szOutBezierCurveObj [ device ] . ToString ( ) : "" ) ;
2019-07-25 21:54:39 +02:00
}
2019-09-08 00:11:10 +02:00
}
private void CustomCurveChecker ( )
{
bool customIdx = lsOutCurveComboBox . SelectedIndex = = lsOutCurveComboBox . Items . Count - 1 ;
tBLSCustomOutputCurve . Enabled = BtnLSCurveEditor . Enabled = customIdx ;
tBLSCustomOutputCurve . Text = ( customIdx ? lsOutBezierCurveObj [ device ] . ToString ( ) : "" ) ;
2019-07-25 21:54:39 +02:00
2019-09-08 00:11:10 +02:00
customIdx = rsOutCurveComboBox . SelectedIndex = = rsOutCurveComboBox . Items . Count - 1 ;
tBRSCustomOutputCurve . Enabled = btnRSCurveEditor . Enabled = customIdx ;
tBRSCustomOutputCurve . Text = ( customIdx ? rsOutBezierCurveObj [ device ] . ToString ( ) : "" ) ;
customIdx = cBL2OutputCurve . SelectedIndex = = cBL2OutputCurve . Items . Count - 1 ;
tBL2CustomOutputCurve . Enabled = btnL2CurveEditor . Enabled = customIdx ;
tBL2CustomOutputCurve . Text = ( customIdx ? l2OutBezierCurveObj [ device ] . ToString ( ) : "" ) ;
customIdx = cBR2OutputCurve . SelectedIndex = = cBR2OutputCurve . Items . Count - 1 ;
tBR2CustomOutputCurve . Enabled = btnR2CurveEditor . Enabled = customIdx ;
tBR2CustomOutputCurve . Text = ( customIdx ? r2OutBezierCurveObj [ device ] . ToString ( ) : "" ) ;
customIdx = cBSixaxisXOutputCurve . SelectedIndex = = cBSixaxisXOutputCurve . Items . Count - 1 ;
tBSixXCustomOutputCurve . Enabled = btnSixXCurveEditor . Enabled = customIdx ;
tBSixXCustomOutputCurve . Text = ( customIdx ? sxOutBezierCurveObj [ device ] . ToString ( ) : "" ) ;
customIdx = cBSixaxisZOutputCurve . SelectedIndex = = cBSixaxisZOutputCurve . Items . Count - 1 ;
tBSixZCustomOutputCurve . Enabled = btnSixZCurveEditor . Enabled = customIdx ;
tBSixZCustomOutputCurve . Text = ( customIdx ? szOutBezierCurveObj [ device ] . ToString ( ) : "" ) ;
2019-07-25 21:54:39 +02:00
}
2017-06-22 09:43:44 +02:00
private void gyroTriggerBehavior_CheckedChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
GyroTriggerTurns [ device ] = gyroTriggerBehavior . Checked ;
2019-02-07 04:42:34 +01:00
if ( device < 4 )
Program . rootHub . touchPad [ device ] ? . ResetToggleGyroM ( ) ;
2017-06-22 09:43:44 +02:00
}
}
2017-06-24 11:52:39 +02:00
private void nUDGyroMouseVertScale_ValueChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
GyroSensVerticalScale [ device ] = ( int ) nUDGyroMouseVertScale . Value ;
}
}
2017-06-29 06:42:16 +02:00
private void nUDGyroSmoothWeight_ValueChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
GyroSmoothingWeight [ device ] = ( double ) nUDGyroSmoothWeight . Value ;
}
}
private void cBGyroSmooth_CheckedChanged ( object sender , EventArgs e )
{
bool value = cBGyroSmooth . Checked ;
nUDGyroSmoothWeight . Enabled = value ;
if ( ! loading )
{
GyroSmoothing [ device ] = value ;
}
}
2017-06-30 10:42:19 +02:00
private void nUDLSRotation_ValueChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
LSRotation [ device ] = ( double ) nUDLSRotation . Value * Math . PI / 180.0 ;
}
}
private void nUDRSRotation_ValueChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
RSRotation [ device ] = ( double ) nUDRSRotation . Value * Math . PI / 180.0 ;
}
}
2017-07-13 05:39:46 +02:00
private void touchpadInvertComboBox_SelectedIndexChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
tempInt = touchpadInvertToValue [ touchpadInvertComboBox . SelectedIndex ] ;
TouchpadInvert [ device ] = tempInt ;
}
}
2017-07-14 14:46:45 +02:00
private void cBGyroMouseXAxis_SelectedIndexChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
GyroMouseHorizontalAxis [ device ] = cBGyroMouseXAxis . SelectedIndex ;
}
}
2017-07-19 00:28:16 +02:00
private void nUDSixAxisXMaxZone_ValueChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
SXMaxzone [ device ] = ( double ) nUDSixAxisXMaxZone . Value ;
}
}
private void nUDSixAxisZMaxZone_ValueChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
SZMaxzone [ device ] = ( double ) nUDSixAxisZMaxZone . Value ;
}
}
2017-07-19 02:44:55 +02:00
private void nUDSixaxisXAntiDead_ValueChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
SXAntiDeadzone [ device ] = ( double ) nUDSixaxisXAntiDead . Value ;
}
}
private void nUDSixaxisZAntiDead_ValueChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
SZAntiDeadzone [ device ] = ( double ) nUDSixaxisZAntiDead . Value ;
}
}
2017-08-05 05:36:46 +02:00
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 > ( ) ;
2017-08-19 03:50:38 +02:00
for ( int i = 0 ; i < touchDisableInvCount ; i + + )
2017-08-05 05:36:46 +02:00
{
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 ) ) ;
}
2017-11-28 16:49:28 +01:00
private void pnlController_Paint ( object sender , PaintEventArgs e )
{
e . Graphics . DrawImage ( pnlControllerBgImg , 0 , 0 , Convert . ToInt32 ( pnlController . Width ) , Convert . ToInt32 ( pnlController . Height - 1 ) ) ;
}
2018-01-01 19:21:35 +01:00
private void trackballCk_CheckedChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
TrackballMode [ device ] = trackballCk . Checked ;
}
}
2018-12-06 23:09:09 +01:00
private void cBSteeringWheelEmulationRange_SelectedIndexChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
SASteeringWheelEmulationRange [ device ] = Convert . ToInt32 ( cBSteeringWheelEmulationRange . Items [ cBSteeringWheelEmulationRange . SelectedIndex ] . ToString ( ) ) ;
}
}
private void cBSteeringWheelEmulationAxis_SelectedIndexChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
2019-01-02 20:44:15 +01:00
if ( cBSteeringWheelEmulationAxis . SelectedIndex > = 0 ) SASteeringWheelEmulationAxis [ device ] = ( SASteeringWheelEmulationAxisType ) ( ( byte ) cBSteeringWheelEmulationAxis . SelectedIndex ) ;
else SASteeringWheelEmulationAxis [ device ] = SASteeringWheelEmulationAxisType . None ;
2018-12-06 23:09:09 +01:00
}
}
private void btnSteeringWheelEmulationCalibrate_Click ( object sender , EventArgs e )
{
if ( cBSteeringWheelEmulationAxis . SelectedIndex > 0 )
{
DS4Device d ;
int tempDeviceNum = ( int ) nUDSixaxis . Value - 1 ;
d = Program . rootHub . DS4Controllers [ tempDeviceNum ] ;
if ( d ! = null )
{
Point origWheelCenterPoint = new Point ( d . wheelCenterPoint . X , d . wheelCenterPoint . Y ) ;
Point origWheel90DegPointLeft = new Point ( d . wheel90DegPointLeft . X , d . wheel90DegPointLeft . Y ) ;
Point origWheel90DegPointRight = new Point ( d . wheel90DegPointRight . X , d . wheel90DegPointRight . Y ) ;
d . WheelRecalibrateActiveState = 1 ;
DialogResult msgBoxResult = MessageBox . Show ( $"{Properties.Resources.SASteeringWheelEmulationCalibrate}.\n\n" +
$"{Properties.Resources.SASteeringWheelEmulationCalibrateInstruction1}.\n" +
$"{Properties.Resources.SASteeringWheelEmulationCalibrateInstruction2}.\n" +
$"{Properties.Resources.SASteeringWheelEmulationCalibrateInstruction3}.\n\n" +
$"{Properties.Resources.SASteeringWheelEmulationCalibrateInstruction}.\n" ,
Properties . Resources . SASteeringWheelEmulationCalibrate ,
MessageBoxButtons . OKCancel ,
MessageBoxIcon . Information ,
MessageBoxDefaultButton . Button1 ,
0 ,
false ) ;
if ( msgBoxResult = = DialogResult . OK )
{
// Accept new calibration values (State 3 is "Complete calibration" state)
d . WheelRecalibrateActiveState = 3 ;
}
else
{
// Cancel calibration and reset back to original calibration values
d . WheelRecalibrateActiveState = 4 ;
d . wheelFullTurnCount = 0 ;
d . wheelCenterPoint = origWheelCenterPoint ;
d . wheel90DegPointLeft = origWheel90DegPointLeft ;
d . wheel90DegPointRight = origWheel90DegPointRight ;
}
}
else
{
MessageBox . Show ( $"{Properties.Resources.SASteeringWheelEmulationCalibrateNoControllerError}." ) ;
}
}
else
{
MessageBox . Show ( $"{Properties.Resources.SASteeringWheelEmulationCalibrateNoneAxisError}." ) ;
}
}
2019-01-31 17:59:00 +01:00
private void gyroMouseDzNUD_ValueChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
SetGyroMouseDeadZone ( device , ( int ) gyroMouseDzNUD . Value ,
Program . rootHub ) ;
}
}
2019-02-07 04:42:34 +01:00
private void toggleGyroMCb_Click ( object sender , EventArgs e )
{
if ( loading = = false )
{
if ( device < 4 )
{
SetGyroMouseToggle ( device , toggleGyroMCb . Checked , Program . rootHub ) ;
}
}
}
2019-03-05 00:21:58 +01:00
private void lsSquStickCk_Click ( object sender , EventArgs e )
{
if ( loading = = false )
{
2019-06-26 08:35:41 +02:00
SquStickInfo [ device ] . lsMode = lsSquStickCk . Checked ;
2019-03-05 00:21:58 +01:00
}
}
private void rsSquStickCk_Click ( object sender , EventArgs e )
{
if ( loading = = false )
{
2019-06-26 08:35:41 +02:00
SquStickInfo [ device ] . rsMode = rsSquStickCk . Checked ;
2019-03-05 00:21:58 +01:00
}
}
2019-06-25 23:42:08 +02:00
private void RoundnessNUpDown_ValueChanged ( object sender , EventArgs e )
{
if ( loading = = false ) {
2019-09-14 05:26:58 +02:00
SquStickInfo [ device ] . lsRoundness = ( double ) RoundnessNUpDown . Value ;
2019-06-25 23:42:08 +02:00
}
}
2019-06-26 08:35:41 +02:00
private void OutContTypeCb_SelectedIndexChanged ( object sender , EventArgs e )
2019-04-19 05:56:18 +02:00
{
if ( loading = = false )
{
int tempOutCont = OutContTypeCb . SelectedIndex ;
OutContType tempType = OutContType . X360 ;
switch ( tempOutCont )
{
case 0 :
tempType = OutContType . X360 ;
defaults = xboxDefaults ;
break ;
case 1 :
tempType = OutContType . DS4 ;
defaults = ds4Defaults ;
break ;
default : break ;
}
2019-10-10 10:28:46 +02:00
Global . outDevTypeTemp [ device ] = tempType ;
2019-04-19 05:56:18 +02:00
UpdateLists ( ) ;
}
}
2019-09-03 14:21:53 +02:00
private void LaunchCurveEditor ( string customDefinition )
{
2019-07-17 22:20:38 +02:00
// Custom curve editor web link clicked. Open the bezier curve editor web app usign the default browser app and pass on current custom definition as a query string parameter.
// The Process.Start command using HTML page doesn't support query parameters, so if there is a custom curve definition then lookup the default browser executable name from a sysreg.
string defaultBrowserCmd = String . Empty ;
try
{
if ( ! String . IsNullOrEmpty ( customDefinition ) )
{
string progId = String . Empty ;
using ( RegistryKey userChoiceKey = Registry . CurrentUser . OpenSubKey ( "Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice" ) )
{
progId = userChoiceKey ? . GetValue ( "Progid" ) ? . ToString ( ) ;
}
if ( ! String . IsNullOrEmpty ( progId ) )
{
using ( RegistryKey browserPathCmdKey = Registry . ClassesRoot . OpenSubKey ( $"{progId}\\shell\\open\\command" ) )
{
defaultBrowserCmd = browserPathCmdKey ? . GetValue ( null ) . ToString ( ) ;
}
2019-09-03 14:21:53 +02:00
if ( ! String . IsNullOrEmpty ( defaultBrowserCmd ) )
2019-07-17 22:20:38 +02:00
{
int iStartPos = ( defaultBrowserCmd [ 0 ] = = '"' ? 1 : 0 ) ;
defaultBrowserCmd = defaultBrowserCmd . Substring ( iStartPos , defaultBrowserCmd . LastIndexOf ( ".exe" ) + 4 - iStartPos ) ;
if ( Path . GetFileName ( defaultBrowserCmd ) . ToLower ( ) = = "launchwinapp.exe" )
defaultBrowserCmd = String . Empty ;
}
// Fallback to IE executable if the default browser HTML shell association is for some reason missing or is not set
if ( String . IsNullOrEmpty ( defaultBrowserCmd ) )
defaultBrowserCmd = "C:\\program files\\Internet Explorer\\iexplore.exe" ;
if ( ! File . Exists ( defaultBrowserCmd ) )
defaultBrowserCmd = String . Empty ;
}
}
// Launch custom bezier editor webapp using a default browser executable command or via a default shell command. The default shell exeution doesn't support query parameters.
if ( ! String . IsNullOrEmpty ( defaultBrowserCmd ) )
System . Diagnostics . Process . Start ( defaultBrowserCmd , $"\" file : ///{Global.exepath}\\BezierCurveEditor\\index.html?curve={customDefinition.Replace(" ", "")}\"");
else
System . Diagnostics . Process . Start ( $"{Global.exepath}\\BezierCurveEditor\\index.html" ) ;
}
catch ( Exception ex )
{
AppLogger . LogToGui ( $"ERROR. Failed to open {Global.exepath}\\BezierCurveEditor\\index.html web app. Check that the web file exits or launch it outside of DS4Windows application. {ex.Message}" , true ) ;
}
}
2019-08-23 05:03:03 +02:00
private void GyroOutputMode_SelectedIndexChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
int choice = gyroOutputMode . SelectedIndex ;
if ( choice = = 0 )
{
fLPTiltControls . Visible = true ;
pnlSAMouse . Visible = false ;
gyroMouseJoyFLP . Visible = false ;
}
else if ( choice = = 1 )
{
fLPTiltControls . Visible = false ;
pnlSAMouse . Visible = true ;
gyroMouseJoyFLP . Visible = false ;
ResetGyroTriggers ( ) ;
string [ ] satriggers = SATriggers [ device ] . Split ( ',' ) ;
MarkCurrentGyroTriggers ( ref satriggers ) ;
}
else if ( choice = = 2 )
{
fLPTiltControls . Visible = false ;
pnlSAMouse . Visible = false ;
gyroMouseJoyFLP . Visible = true ;
ResetGyroTriggers ( ) ;
string [ ] satriggers = SAMousestickTriggers [ device ] . Split ( ',' ) ;
MarkCurrentGyroTriggers ( ref satriggers ) ;
}
switch ( choice )
{
case 0 :
GyroOutputMode [ device ] = GyroOutMode . Controls ;
break ;
case 1 :
GyroOutputMode [ device ] = GyroOutMode . Mouse ;
2019-08-27 00:47:57 +02:00
SetGyroMouseToggle ( device , toggleGyroMCb . Checked ,
Program . rootHub ) ;
2019-08-23 05:03:03 +02:00
break ;
case 2 :
GyroOutputMode [ device ] = GyroOutMode . MouseJoystick ;
2019-08-27 00:47:57 +02:00
SetGyroMouseStickToggle ( device ,
gyroMStickToggleCk . Checked , Program . rootHub ) ;
2019-08-23 05:03:03 +02:00
break ;
default :
break ;
}
if ( device < 4 )
Program . rootHub . touchPad [ device ] ? . ResetToggleGyroM ( ) ;
}
}
private void BtnGyroMStickTrig_Click ( object sender , EventArgs e )
{
Control button = ( Control ) sender ;
cMGyroTriggers . Show ( button , new Point ( 0 , button . Height ) ) ;
}
private void GyroMStickTrigBehaveCk_CheckedChanged ( object sender , EventArgs e )
{
if ( ! loading )
{
GyroMouseStickTriggerTurns [ device ] = gyroMStickTrigBehaveCk . Checked ;
if ( device < 4 )
Program . rootHub . touchPad [ device ] ? . ResetToggleGyroM ( ) ;
}
}
private void GyroMouseStickEvalCombo_SelectedIndexChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
string temp = gyroMouseStickEvalCombo . SelectedItem . ToString ( ) ;
SetSaMouseStickTriggerCond ( device , temp ) ;
}
}
private void GyroMouseStickDZ_ValueChanged ( object sender , EventArgs e )
{
if ( loading = = false & & GyroMouseStickDead ( ) )
{
GyroMouseStickInf [ device ] . deadZone = ( int ) gyroMouseStickDZ . Value ;
}
}
private void GyroMouseStickMaxZ_ValueChanged ( object sender , EventArgs e )
{
if ( loading = = false & & GyroMouseStickDead ( ) )
{
GyroMouseStickInf [ device ] . maxZone = ( int ) gyroMouseStickMaxZ . Value ;
}
}
private bool GyroMouseStickDead ( )
{
return gyroMouseStickDZ . Value < = gyroMouseStickMaxZ . Value ;
}
private void GyroMouseStickAntiDeadX_ValueChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
GyroMouseStickInf [ device ] . antiDeadX = ( double ) gyroMouseStickAntiDeadX . Value ;
}
}
private void GyroMouseSStickAntiDeadY_ValueChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
GyroMouseStickInf [ device ] . antiDeadY = ( double ) gyroMouseStickAntiDeadY . Value ;
}
}
private void GyroMouseStickInvert_CheckedChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
uint value = 0 ;
if ( gyroMouseStickInvertXCk . Checked ) value | = 1 < < 0 ;
if ( gyroMouseStickInvertYCk . Checked ) value | = 1 < < 1 ;
2019-08-24 08:13:30 +02:00
GyroMouseStickInf [ device ] . inverted = value ;
2019-08-23 05:03:03 +02:00
}
}
2019-08-26 12:51:54 +02:00
private void GyroMStickToggleCk_CheckedChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
Global . SetGyroMouseStickToggle ( device ,
gyroMStickToggleCk . Checked , Program . rootHub ) ;
}
}
2019-08-27 01:53:28 +02:00
private void GyroMStickVertScaleNUD_ValueChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
GyroMouseStickInf [ device ] . vertScale = ( int ) gyroMStickVertScaleNUD . Value ;
}
}
2019-08-27 05:15:38 +02:00
private void GyroMStickSmoothWeightNUD_ValueChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
GyroMouseStickInf [ device ] . smoothWeight =
( double ) gyroMStickSmoothWeightNUD . Value ;
}
}
private void GyroMStickUseSmoothCk_CheckedChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
GyroMouseStickInf [ device ] . useSmoothing =
gyroMStickUseSmoothCk . Checked ;
gyroMStickSmoothWeightNUD . Enabled =
GyroMouseStickInf [ device ] . useSmoothing ;
}
}
2019-09-03 13:20:05 +02:00
private void GyroMousestickXAxisCom_SelectedIndexChanged ( object sender , EventArgs e )
{
if ( loading = = false )
{
GyroMouseStickHorizontalAxis [ device ] = gyroMousestickXAxisCom . SelectedIndex ;
}
}
2019-06-26 08:35:41 +02:00
private void trackFrictionNUD_ValueChanged ( object sender , EventArgs e )
2018-01-01 19:21:35 +01:00
{
if ( loading = = false )
{
TrackballFriction [ device ] = ( double ) trackFrictionNUD . Value ;
if ( device < 4 )
{
Program . rootHub . touchPad [ device ] ? . ResetTrackAccel ( TrackballFriction [ device ] ) ;
}
}
}
2017-12-01 11:47:10 +01:00
private void btnLightbar_Paint ( object sender , PaintEventArgs e )
{
e . Graphics . DrawImage ( btnLightBgImg , new Rectangle ( 0 , - 1 , Convert . ToInt32 ( btnLightbar . Width ) , Convert . ToInt32 ( btnLightbar . Height - 2 ) ) ) ;
}
2015-11-28 06:47:26 +01:00
private void lBControls_SelectedIndexChanged ( object sender , EventArgs e )
{
2017-04-26 23:51:15 +02:00
int controlSelectedIndex = lBControls . SelectedIndex ;
2015-11-30 22:15:17 +01:00
if ( lBControls . SelectedItem ! = null )
{
2017-04-26 23:51:15 +02:00
if ( controlSelectedIndex = = 0 )
2015-11-30 22:15:17 +01:00
lbControlName . ForeColor = Color . FromArgb ( 153 , 205 , 204 ) ;
2017-04-26 23:51:15 +02:00
else if ( controlSelectedIndex = = 1 )
2015-11-30 22:15:17 +01:00
lbControlName . ForeColor = Color . FromArgb ( 247 , 131 , 150 ) ;
2017-04-26 23:51:15 +02:00
else if ( controlSelectedIndex = = 2 )
2015-11-30 22:15:17 +01:00
lbControlName . ForeColor = Color . FromArgb ( 237 , 170 , 217 ) ;
2017-04-26 23:51:15 +02:00
else if ( controlSelectedIndex = = 3 )
2015-11-30 22:15:17 +01:00
lbControlName . ForeColor = Color . FromArgb ( 75 , 194 , 202 ) ;
else
lbControlName . ForeColor = Color . White ;
}
2017-04-26 23:51:15 +02:00
if ( controlSelectedIndex = = 0 ) button_MouseHover ( bnCross , null ) ;
else if ( controlSelectedIndex = = 1 ) button_MouseHover ( bnCircle , null ) ;
else if ( controlSelectedIndex = = 2 ) button_MouseHover ( bnSquare , null ) ;
else if ( controlSelectedIndex = = 3 ) button_MouseHover ( bnTriangle , null ) ;
else if ( controlSelectedIndex = = 4 ) button_MouseHover ( bnOptions , null ) ;
else if ( controlSelectedIndex = = 5 ) button_MouseHover ( bnShare , null ) ;
else if ( controlSelectedIndex = = 6 ) button_MouseHover ( bnUp , null ) ;
else if ( controlSelectedIndex = = 7 ) button_MouseHover ( bnDown , null ) ;
else if ( controlSelectedIndex = = 8 ) button_MouseHover ( bnLeft , null ) ;
else if ( controlSelectedIndex = = 9 ) button_MouseHover ( bnRight , null ) ;
else if ( controlSelectedIndex = = 10 ) button_MouseHover ( bnPS , null ) ;
else if ( controlSelectedIndex = = 11 ) button_MouseHover ( bnL1 , null ) ;
else if ( controlSelectedIndex = = 12 ) button_MouseHover ( bnR1 , null ) ;
else if ( controlSelectedIndex = = 13 ) button_MouseHover ( bnL2 , null ) ;
else if ( controlSelectedIndex = = 14 ) button_MouseHover ( bnR2 , null ) ;
else if ( controlSelectedIndex = = 15 ) button_MouseHover ( bnL3 , null ) ;
else if ( controlSelectedIndex = = 16 ) button_MouseHover ( bnR3 , null ) ;
else if ( controlSelectedIndex = = 17 ) button_MouseHover ( bnTouchLeft , null ) ;
else if ( controlSelectedIndex = = 18 ) button_MouseHover ( bnTouchRight , null ) ;
else if ( controlSelectedIndex = = 19 ) button_MouseHover ( bnTouchMulti , null ) ;
else if ( controlSelectedIndex = = 20 ) button_MouseHover ( bnTouchUpper , null ) ;
else if ( controlSelectedIndex = = 21 ) button_MouseHover ( bnLSUp , null ) ;
else if ( controlSelectedIndex = = 22 ) button_MouseHover ( bnLSDown , null ) ;
else if ( controlSelectedIndex = = 23 ) button_MouseHover ( bnLSLeft , null ) ;
else if ( controlSelectedIndex = = 24 ) button_MouseHover ( bnLSRight , null ) ;
else if ( controlSelectedIndex = = 25 ) button_MouseHover ( bnRSUp , null ) ;
else if ( controlSelectedIndex = = 26 ) button_MouseHover ( bnRSDown , null ) ;
else if ( controlSelectedIndex = = 27 ) button_MouseHover ( bnRSLeft , null ) ;
else if ( controlSelectedIndex = = 28 ) button_MouseHover ( bnRSRight , null ) ;
else if ( controlSelectedIndex = = 29 ) button_MouseHover ( bnGyroZN , null ) ;
else if ( controlSelectedIndex = = 30 ) button_MouseHover ( bnGyroZP , null ) ;
else if ( controlSelectedIndex = = 31 ) button_MouseHover ( bnGyroXP , null ) ;
else if ( controlSelectedIndex = = 32 ) button_MouseHover ( bnGyroXN , null ) ;
else if ( controlSelectedIndex = = 33 ) button_MouseHover ( bnSwipeUp , null ) ;
else if ( controlSelectedIndex = = 34 ) button_MouseHover ( bnSwipeDown , null ) ;
else if ( controlSelectedIndex = = 35 ) button_MouseHover ( bnSwipeLeft , null ) ;
else if ( controlSelectedIndex = = 36 ) button_MouseHover ( bnSwipeRight , null ) ;
2015-11-28 06:47:26 +01:00
}
2015-12-18 07:25:51 +01:00
2015-11-28 06:47:26 +01:00
private void nUDGyroSensitivity_ValueChanged ( object sender , EventArgs e )
{
GyroSensitivity [ device ] = ( int ) Math . Round ( nUDGyroSensitivity . Value , 0 ) ;
}
2015-02-08 22:51:52 +01:00
private void cBFlashType_SelectedIndexChanged ( object sender , EventArgs e )
{
2017-04-26 23:51:15 +02:00
FlashType [ device ] = ( byte ) cBFlashType . SelectedIndex ;
2015-02-08 22:51:52 +01:00
}
2014-04-27 21:32:09 +02:00
}
2014-03-28 02:50:40 +01:00
}