2014-03-28 02:50:40 +01:00
using System ;
using System.Windows.Forms ;
using System.Runtime.InteropServices ;
2014-04-27 21:32:09 +02:00
using System.IO ;
using System.Reflection ;
using System.Collections.Generic ;
2014-05-14 09:12:15 +02:00
using System.Net ;
2014-05-21 07:36:05 +02:00
using System.Management ;
2014-05-30 22:39:39 +02:00
using System.Drawing ;
2014-05-21 19:39:56 +02:00
using Microsoft.Win32 ;
2014-05-28 21:47:25 +02:00
using System.Diagnostics ;
2014-06-06 22:38:52 +02:00
using System.Xml ;
2014-06-09 01:41:36 +02:00
using System.Text ;
2014-06-26 20:02:01 +02:00
using System.Globalization ;
2017-04-20 07:54:09 +02:00
using Microsoft.Win32.TaskScheduler ;
using System.Security.Principal ;
2017-05-14 01:47:04 +02:00
using static DS4Windows . Global ;
2017-04-20 07:54:09 +02:00
2014-11-18 22:23:41 +01:00
namespace DS4Windows
2014-03-28 02:50:40 +01:00
{
2014-11-14 20:44:50 +01:00
public partial class DS4Form : Form
2014-03-28 02:50:40 +01:00
{
2014-10-13 23:56:04 +02:00
public string [ ] arguements ;
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
delegate void LogDebugDelegate ( DateTime Time , String Data , bool warning ) ;
2017-04-25 03:26:34 +02:00
delegate void NotificationDelegate ( object sender , DebugEventArgs args ) ;
2017-04-25 11:24:14 +02:00
delegate void BatteryStatusDelegate ( object sender , BatteryReportArgs args ) ;
2017-04-26 10:00:05 +02:00
delegate void ControllerRemovedDelegate ( object sender , ControllerRemovedArgs args ) ;
2017-04-29 10:19:45 +02:00
delegate void DeviceStatusChangedDelegate ( object sender , DeviceStatusChangeEventArgs args ) ;
2014-05-30 22:39:39 +02:00
protected Label [ ] Pads , Batteries ;
2014-04-27 21:32:09 +02:00
protected ComboBox [ ] cbs ;
protected Button [ ] ebns ;
2015-11-28 06:47:26 +01:00
protected Button [ ] lights ;
2014-05-30 22:39:39 +02:00
protected PictureBox [ ] statPB ;
2014-04-29 03:14:01 +02:00
protected ToolStripMenuItem [ ] shortcuts ;
2014-05-14 09:12:15 +02:00
WebClient wc = new WebClient ( ) ;
2017-05-05 05:15:22 +02:00
Timer hotkeysTimer = new Timer ( ) ;
2017-05-09 16:24:46 +02:00
Timer autoProfilesTimer = new Timer ( ) ;
2014-06-06 22:38:52 +02:00
string exepath = Directory . GetParent ( Assembly . GetExecutingAssembly ( ) . Location ) . FullName ;
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
string appDataPpath = Environment . GetFolderPath ( Environment . SpecialFolder . ApplicationData ) + "\\DS4Windows" ;
2014-12-02 01:07:29 +01:00
string oldappdatapath = Environment . GetFolderPath ( Environment . SpecialFolder . ApplicationData ) + "\\DS4Tool" ;
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 tempProfileProgram = "null" ;
2014-06-06 22:38:52 +02:00
float dpix , dpiy ;
2015-02-08 22:51:52 +01:00
List < string > profilenames = new List < string > ( ) ;
2014-06-06 22:38:52 +02:00
List < string > programpaths = new List < string > ( ) ;
List < string > [ ] proprofiles ;
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
List < bool > turnOffTempProfiles ;
2014-06-06 22:38:52 +02:00
private static int WM_QUERYENDSESSION = 0x11 ;
private static bool systemShutdown = false ;
2014-08-23 22:52:20 +02:00
private bool wasrunning = false ;
2014-06-06 22:38:52 +02:00
delegate void ControllerStatusChangedDelegate ( object sender , EventArgs e ) ;
delegate void HotKeysDelegate ( object sender , EventArgs e ) ;
Options opt ;
2017-05-14 01:47:04 +02:00
public Size oldsize ;
2014-06-09 01:41:36 +02:00
WinProgs WP ;
2014-12-13 21:12:03 +01:00
public bool mAllowVisible ;
bool contextclose ;
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
string logFile = appdatapath + @"\DS4Service.log" ;
2017-05-05 05:15:22 +02:00
//StreamWriter logWriter;
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
bool turnOffTemp ;
2015-08-13 05:53:43 +02:00
bool runningBat ;
2014-12-17 19:29:22 +01:00
//bool outputlog = false;
2017-05-05 05:15:22 +02:00
Dictionary < Control , string > hoverTextDict = new Dictionary < Control , string > ( ) ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
2017-04-24 11:43:56 +02:00
internal const int BCM_FIRST = 0x1600 ; // Normal button
internal const int BCM_SETSHIELD = ( BCM_FIRST + 0x000C ) ; // Elevated button
2014-06-09 01:41:36 +02:00
[DllImport("user32.dll")]
private static extern IntPtr GetForegroundWindow ( ) ;
[DllImport("user32.dll")]
private static extern uint GetWindowThreadProcessId ( IntPtr hWnd , out uint lpdwProcessId ) ;
2017-04-24 11:43:56 +02:00
[DllImport("user32.dll")]
private static extern int SendMessage ( IntPtr hwnd , int wMsg , int wParam , uint lParam ) ;
2014-06-09 01:41:36 +02:00
[DllImport("kernel32.dll")]
private static extern IntPtr OpenProcess ( uint dwDesiredAccess , bool bInheritHandle , uint dwProcessId ) ;
[DllImport("kernel32.dll")]
private static extern bool CloseHandle ( IntPtr handle ) ;
[DllImport("psapi.dll")]
private static extern uint GetModuleBaseName ( IntPtr hWnd , IntPtr hModule , StringBuilder lpFileName , int nSize ) ;
[DllImport("psapi.dll")]
private static extern uint GetModuleFileNameEx ( IntPtr hWnd , IntPtr hModule , StringBuilder lpFileName , int nSize ) ;
2014-11-14 20:44:50 +01:00
public DS4Form ( string [ ] args )
2014-05-30 22:39:39 +02:00
{
InitializeComponent ( ) ;
2017-04-20 07:54:09 +02:00
2017-05-13 07:54:29 +02:00
bnEditC1 . Tag = 0 ;
bnEditC2 . Tag = 1 ;
bnEditC3 . Tag = 2 ;
bnEditC4 . Tag = 3 ;
2017-04-20 07:54:09 +02:00
this . StartWindowsCheckBox . CheckedChanged - = this . StartWindowsCheckBox_CheckedChanged ;
2015-11-28 06:47:26 +01:00
saveProfiles . Filter = Properties . Resources . XMLFiles + "|*.xml" ;
openProfiles . Filter = Properties . Resources . XMLFiles + "|*.xml" ;
2014-10-13 23:56:04 +02:00
arguements = args ;
2014-05-30 22:39:39 +02:00
ThemeUtil . SetTheme ( lvDebug ) ;
2014-11-20 20:03:18 +01:00
Pads = new Label [ 4 ] { lbPad1 , lbPad2 , lbPad3 , lbPad4 } ;
2015-02-08 22:51:52 +01:00
Batteries = new Label [ 4 ] { lbBatt1 , lbBatt2 , lbBatt3 , lbBatt4 } ;
2014-11-20 20:03:18 +01:00
cbs = new ComboBox [ 4 ] { cBController1 , cBController2 , cBController3 , cBController4 } ;
ebns = new Button [ 4 ] { bnEditC1 , bnEditC2 , bnEditC3 , bnEditC4 } ;
2015-11-28 06:47:26 +01:00
lights = new Button [ 4 ] { bnLight1 , bnLight2 , bnLight3 , bnLight4 } ;
2014-11-20 20:03:18 +01:00
statPB = new PictureBox [ 4 ] { pBStatus1 , pBStatus2 , pBStatus3 , pBStatus4 } ;
shortcuts = new ToolStripMenuItem [ 4 ] { ( ToolStripMenuItem ) notifyIcon1 . ContextMenuStrip . Items [ 0 ] ,
( ToolStripMenuItem ) notifyIcon1 . ContextMenuStrip . Items [ 1 ] ,
( ToolStripMenuItem ) notifyIcon1 . ContextMenuStrip . Items [ 2 ] ,
( ToolStripMenuItem ) notifyIcon1 . ContextMenuStrip . Items [ 3 ] } ;
2014-06-06 22:38:52 +02:00
SystemEvents . PowerModeChanged + = OnPowerChange ;
2014-06-02 19:29:38 +02:00
tSOptions . Visible = false ;
2014-11-04 05:43:38 +01:00
bool firstrun = false ;
2017-05-14 01:47:04 +02:00
2014-11-04 05:43:38 +01:00
if ( File . Exists ( exepath + "\\Auto Profiles.xml" )
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
& & File . Exists ( appDataPpath + "\\Auto Profiles.xml" ) )
2014-11-04 05:43:38 +01:00
{
firstrun = true ;
new SaveWhere ( true ) . ShowDialog ( ) ;
}
else if ( File . Exists ( exepath + "\\Auto Profiles.xml" ) )
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
SaveWhere ( exepath ) ;
else if ( File . Exists ( appDataPpath + "\\Auto Profiles.xml" ) )
SaveWhere ( appDataPpath ) ;
2014-12-02 01:07:29 +01:00
else if ( File . Exists ( oldappdatapath + "\\Auto Profiles.xml" ) )
{
try
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
if ( Directory . Exists ( appDataPpath ) )
Directory . Move ( appDataPpath , Environment . GetFolderPath ( Environment . SpecialFolder . ApplicationData ) + "\\DS4Windows Old" ) ;
Directory . Move ( oldappdatapath , appDataPpath ) ;
SaveWhere ( appDataPpath ) ;
2014-12-02 01:07:29 +01:00
}
catch
{
2014-12-03 23:36:54 +01:00
MessageBox . Show ( Properties . Resources . CannotMoveFiles , "DS4Windows" ) ;
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
Process . Start ( "explorer.exe" , @"/select, " + appDataPpath ) ;
2015-02-08 22:51:52 +01:00
Close ( ) ;
2014-12-02 01:07:29 +01:00
return ;
}
}
2014-11-04 05:43:38 +01:00
else if ( ! File . Exists ( exepath + "\\Auto Profiles.xml" )
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
& & ! File . Exists ( appDataPpath + "\\Auto Profiles.xml" ) )
2014-11-04 05:43:38 +01:00
{
firstrun = true ;
new SaveWhere ( false ) . ShowDialog ( ) ;
}
2017-04-29 10:19:45 +02:00
2014-11-04 05:43:38 +01:00
if ( firstrun )
CheckDrivers ( ) ;
else
2014-10-14 20:54:42 +02:00
{
2014-11-04 04:44:55 +01:00
var AppCollectionThread = new System . Threading . Thread ( ( ) = > CheckDrivers ( ) ) ;
AppCollectionThread . IsBackground = true ;
AppCollectionThread . Start ( ) ;
2014-11-04 05:43:38 +01:00
}
2014-10-14 20:54:42 +02:00
2017-05-14 01:47:04 +02:00
if ( string . IsNullOrEmpty ( appdatapath ) )
2014-11-04 05:43:38 +01:00
{
Close ( ) ;
return ;
}
2017-04-29 10:19:45 +02:00
2014-11-04 05:43:38 +01:00
Graphics g = this . CreateGraphics ( ) ;
try
{
2014-11-14 20:44:50 +01:00
dpix = g . DpiX / 100f * 1.041666666667f ;
dpiy = g . DpiY / 100f * 1.041666666667f ;
2014-11-04 05:43:38 +01:00
}
finally
{
g . Dispose ( ) ;
}
2017-04-29 10:19:45 +02:00
blankControllerTab ( ) ;
2014-12-13 21:12:03 +01:00
Program . rootHub . Debug + = On_Debug ;
2015-02-08 22:51:52 +01:00
2014-11-04 05:43:38 +01:00
Log . GuiLog + = On_Debug ;
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
logFile = appdatapath + "\\DS4Windows.log" ;
2014-12-17 19:29:22 +01:00
//logWriter = File.AppendText(logFile);
2014-11-04 05:43:38 +01:00
Log . TrayIconLog + = ShowNotification ;
// tmrUpdate.Enabled = true; TODO remove tmrUpdate and leave tick()
2014-10-14 20:54:42 +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
Directory . CreateDirectory ( appdatapath ) ;
2014-11-04 05:43:38 +01:00
Global . Load ( ) ;
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
if ( ! Save ( ) ) //if can't write to file
2017-04-29 10:19:45 +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 ( MessageBox . Show ( "Cannot write at current location\nCopy Settings to appdata?" , "DS4Windows" ,
2014-11-04 05:43:38 +01:00
MessageBoxButtons . YesNo , MessageBoxIcon . Warning ) = = System . Windows . Forms . DialogResult . Yes )
{
try
2014-10-14 20:54:42 +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
Directory . CreateDirectory ( appDataPpath ) ;
File . Copy ( exepath + "\\Profiles.xml" , appDataPpath + "\\Profiles.xml" ) ;
File . Copy ( exepath + "\\Auto Profiles.xml" , appDataPpath + "\\Auto Profiles.xml" ) ;
Directory . CreateDirectory ( appDataPpath + "\\Profiles" ) ;
2014-11-04 05:43:38 +01:00
foreach ( string s in Directory . GetFiles ( exepath + "\\Profiles" ) )
2014-10-14 20:54:42 +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
File . Copy ( s , appDataPpath + "\\Profiles\\" + Path . GetFileName ( s ) ) ;
2014-10-14 20:54:42 +02:00
}
}
2014-11-04 05:43:38 +01:00
catch { }
MessageBox . Show ( "Copy complete, please relaunch DS4Windows and remove settings from Program Directory" , "DS4Windows" ) ;
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
appdatapath = null ;
2014-11-04 05:43:38 +01:00
Close ( ) ;
return ;
2014-10-14 20:54:42 +02:00
}
2014-11-04 05:43:38 +01:00
else
2014-10-14 20:54:42 +02:00
{
2014-11-04 05:43:38 +01:00
MessageBox . Show ( "DS4Windows cannot edit settings here, This will now close" , "DS4Windows" ) ;
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
appdatapath = null ;
2014-11-04 05:43:38 +01:00
Close ( ) ;
return ;
2014-10-14 20:54:42 +02:00
}
2017-04-29 10:19:45 +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
//MessageBox.Show(Environment.OSVersion.VersionString);
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
cBUseWhiteIcon . Checked = UseWhiteIcon ;
Icon = Properties . Resources . DS4W ;
notifyIcon1 . Icon = UseWhiteIcon ? Properties . Resources . DS4W___White : Properties . Resources . DS4W ;
2014-11-04 05:43:38 +01:00
foreach ( ToolStripMenuItem t in shortcuts )
t . DropDownItemClicked + = Profile_Changed_Menu ;
2017-04-29 10:19:45 +02:00
2015-08-13 05:53:43 +02:00
hideDS4CheckBox . CheckedChanged - = hideDS4CheckBox_CheckedChanged ;
hideDS4CheckBox . Checked = UseExclusiveMode ;
hideDS4CheckBox . CheckedChanged + = hideDS4CheckBox_CheckedChanged ;
2015-11-28 06:47:26 +01:00
if ( Environment . OSVersion . Version . Major > = 10 & & Environment . OSVersion . Version . Build < 10586 )
2015-08-13 05:53:43 +02:00
{
toolTip1 . SetToolTip ( hideDS4CheckBox , "For Windows 10, use button on the main tab to connect exclusivly" ) ;
btnConnectDS4Win10 . Visible = hideDS4CheckBox . Checked ;
toolTip1 . SetToolTip ( btnConnectDS4Win10 , "This will temporarily kill the taskbar until you connect a controller" ) ;
}
2015-11-28 06:47:26 +01:00
else
btnConnectDS4Win10 . Visible = false ;
2017-04-29 10:19:45 +02:00
2015-08-13 05:53:43 +02:00
cBDisconnectBT . Checked = DCBTatStop ;
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
cBQuickCharge . Checked = QuickCharge ;
nUDXIPorts . Value = FirstXinputPort ;
Program . rootHub . x360Bus . FirstController = FirstXinputPort ;
2014-11-04 05:43:38 +01:00
// New settings
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
this . Width = FormWidth ;
this . Height = FormHeight ;
2014-11-04 05:43:38 +01:00
startMinimizedCheckBox . CheckedChanged - = startMinimizedCheckBox_CheckedChanged ;
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
startMinimizedCheckBox . Checked = StartMinimized ;
2014-11-04 05:43:38 +01:00
startMinimizedCheckBox . CheckedChanged + = startMinimizedCheckBox_CheckedChanged ;
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
cBCloseMini . Checked = CloseMini ;
2015-02-08 22:51:52 +01:00
string lang = CultureInfo . CurrentCulture . ToString ( ) ;
if ( lang . StartsWith ( "en" ) )
cBDownloadLangauge . Visible = false ;
2017-04-29 10:19:45 +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
cBDownloadLangauge . Checked = DownloadLang ;
cBFlashWhenLate . Checked = FlashWhenLate ;
nUDLatency . Value = FlashWhenLateAt ;
if ( ! LoadActions ( ) ) //if first no actions have been made yet, create PS+Option to D/C and save it to every profile
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
{
XmlDocument xDoc = new XmlDocument ( ) ;
try
{
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
string [ ] profiles = Directory . GetFiles ( appdatapath + @"\Profiles\" ) ;
2017-05-14 01:47:04 +02:00
foreach ( string s in profiles )
{
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 ( Path . GetExtension ( s ) = = ".xml" )
{
xDoc . Load ( s ) ;
XmlNode el = xDoc . SelectSingleNode ( "DS4Windows/ProfileActions" ) ; //.CreateElement("Action");
if ( el ! = null )
if ( string . IsNullOrEmpty ( el . InnerText ) )
el . InnerText = "Disconnect Controller" ;
else
el . InnerText + = "/Disconnect Controller" ;
else
{
XmlNode Node = xDoc . SelectSingleNode ( "DS4Windows" ) ;
el = xDoc . CreateElement ( "ProfileActions" ) ;
el . InnerText = "Disconnect Controller" ;
Node . AppendChild ( el ) ;
}
xDoc . Save ( s ) ;
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
LoadActions ( ) ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
}
2017-05-14 01:47:04 +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
}
catch { }
2015-02-08 22:51:52 +01:00
}
2017-04-29 10:19:45 +02:00
2014-12-13 21:12:03 +01:00
bool start = true ;
bool mini = false ;
2017-04-20 07:54:09 +02:00
for ( int i = 0 , argslen = arguements . Length ; i < argslen ; i + + )
2014-12-13 21:12:03 +01:00
{
if ( arguements [ i ] = = "-stop" )
start = false ;
if ( arguements [ i ] = = "-m" )
mini = true ;
if ( mini & & start )
break ;
}
2017-04-29 10:19:45 +02:00
2014-12-13 21:12:03 +01:00
if ( ! ( startMinimizedCheckBox . Checked | | mini ) )
2014-11-20 20:03:18 +01:00
{
mAllowVisible = true ;
Show ( ) ;
}
2017-04-29 10:19:45 +02:00
2014-11-04 05:43:38 +01:00
Form_Resize ( null , null ) ;
RefreshProfiles ( ) ;
2015-11-30 22:15:17 +01:00
opt = new Options ( this ) ;
//opt.Text = "Options for Controller " + (devID + 1);
opt . Icon = this . Icon ;
opt . TopLevel = false ;
opt . Dock = DockStyle . Fill ;
opt . FormBorderStyle = System . Windows . Forms . FormBorderStyle . None ;
tabProfiles . Controls . Add ( opt ) ;
2017-05-14 01:47:04 +02:00
2014-11-04 05:43:38 +01:00
for ( int i = 0 ; i < 4 ; i + + )
{
2017-05-11 15:41:18 +02:00
LoadProfile ( i , false , Program . rootHub , false ) ;
2015-11-28 06:47:26 +01:00
if ( UseCustomLed [ i ] )
lights [ i ] . BackColor = CustomColor [ i ] . ToColorA ;
else
lights [ i ] . BackColor = MainColor [ i ] . ToColorA ;
2014-11-04 05:43:38 +01:00
}
2017-04-29 10:19:45 +02:00
2017-05-09 16:24:46 +02:00
autoProfilesTimer . Tick + = CheckAutoProfiles ;
autoProfilesTimer . Interval = 1000 ;
2014-11-04 05:43:38 +01:00
LoadP ( ) ;
2017-05-14 01:47:04 +02:00
2017-04-25 11:24:14 +02:00
Global . BatteryStatusChange + = BatteryStatusUpdate ;
2017-04-26 10:00:05 +02:00
Global . ControllerRemoved + = ControllerRemovedChange ;
2017-04-29 10:19:45 +02:00
Global . DeviceStatusChange + = DeviceStatusChanged ;
2014-12-03 23:36:54 +01:00
Enable_Controls ( 0 , false ) ;
Enable_Controls ( 1 , false ) ;
Enable_Controls ( 2 , false ) ;
Enable_Controls ( 3 , false ) ;
2015-04-21 21:00:09 +02:00
btnStartStop . Text = Properties . Resources . StartText ;
2017-05-09 16:24:46 +02:00
hotkeysTimer . Tick + = Hotkeys ;
if ( SwipeProfiles )
{
hotkeysTimer . Start ( ) ;
}
2014-11-04 05:43:38 +01:00
if ( btnStartStop . Enabled & & start )
btnStartStop_Clicked ( ) ;
2017-04-29 10:19:45 +02:00
2014-11-04 05:43:38 +01:00
startToolStripMenuItem . Text = btnStartStop . Text ;
2017-05-08 16:29:38 +02:00
//if (!tLPControllers.Visible)
// tabMain.SelectedIndex = 1;
2017-04-29 10:19:45 +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
//cBNotifications.Checked = Notifications;
cBoxNotifications . SelectedIndex = Notifications ;
cBSwipeProfiles . Checked = SwipeProfiles ;
int checkwhen = CheckWhen ;
2014-11-04 05:43:38 +01:00
cBUpdate . Checked = checkwhen > 0 ;
if ( checkwhen > 23 )
{
cBUpdateTime . SelectedIndex = 1 ;
nUDUpdateTime . Value = checkwhen / 24 ;
}
else
{
cBUpdateTime . SelectedIndex = 0 ;
nUDUpdateTime . Value = checkwhen ;
}
2017-04-25 03:26:34 +02:00
2017-03-20 00:13:09 +01:00
Uri url = new Uri ( "http://23.236.26.40/ds4windows/files/builds/newest.txt" ) ; //Sorry other devs, gonna have to find your own server
2014-10-14 20:54:42 +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
if ( checkwhen > 0 & & DateTime . Now > = LastChecked + TimeSpan . FromHours ( checkwhen ) )
2014-11-04 05:43:38 +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
wc . DownloadFileAsync ( url , appdatapath + "\\version.txt" ) ;
2014-11-04 05:43:38 +01:00
wc . DownloadFileCompleted + = Check_Version ;
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
LastChecked = DateTime . Now ;
2014-11-04 05:43:38 +01:00
}
2014-10-14 20:54:42 +02:00
2014-11-04 05:43:38 +01:00
if ( File . Exists ( exepath + "\\Updater.exe" ) )
{
System . Threading . Thread . Sleep ( 2000 ) ;
File . Delete ( exepath + "\\Updater.exe" ) ;
2014-10-14 20:54:42 +02:00
}
2017-04-29 10:19:45 +02:00
2015-12-13 22:30:54 +01:00
if ( ! Directory . Exists ( appdatapath + "\\Virtual Bus Driver" ) )
2014-11-04 05:43:38 +01:00
linkUninstall . Visible = false ;
2017-04-20 07:54:09 +02:00
2017-05-02 07:05:58 +02:00
bool isElevated = Global . IsAdministrator ( ) ;
if ( ! isElevated )
{
Image tempImg = new Bitmap ( uacPictureBox . Width , uacPictureBox . Height ) ;
AddUACShieldToImage ( tempImg ) ;
uacPictureBox . BackgroundImage = tempImg ;
uacPictureBox . Visible = true ;
2017-05-05 05:15:22 +02:00
new ToolTip ( ) . SetToolTip ( uacPictureBox , Properties . Resources . UACTask ) ;
2017-05-02 07:05:58 +02:00
runStartTaskRadio . Enabled = false ;
}
else
{
runStartTaskRadio . Enabled = true ;
}
2014-12-13 21:12:03 +01:00
if ( File . Exists ( Environment . GetFolderPath ( Environment . SpecialFolder . Startup ) + "\\DS4Windows.lnk" ) )
{
StartWindowsCheckBox . Checked = true ;
2017-04-20 07:54:09 +02:00
runStartupPanel . Visible = true ;
2017-04-24 11:43:56 +02:00
2014-12-13 21:12:03 +01:00
string lnkpath = WinProgs . ResolveShortcutAndArgument ( Environment . GetFolderPath ( Environment . SpecialFolder . Startup ) + "\\DS4Windows.lnk" ) ;
2017-04-20 07:54:09 +02:00
string onlylnkpath = WinProgs . ResolveShortcut ( Environment . GetFolderPath ( Environment . SpecialFolder . Startup ) + "\\DS4Windows.lnk" ) ;
if ( ! lnkpath . EndsWith ( "-runtask" ) )
{
runStartProgRadio . Checked = true ;
}
else
{
runStartTaskRadio . Checked = true ;
}
if ( onlylnkpath ! = Process . GetCurrentProcess ( ) . MainModule . FileName )
2014-12-13 21:12:03 +01:00
{
File . Delete ( Environment . GetFolderPath ( Environment . SpecialFolder . Startup ) + "\\DS4Windows.lnk" ) ;
appShortcutToStartup ( ) ;
2017-04-20 07:54:09 +02:00
changeStartupRoutine ( ) ;
2014-12-13 21:12:03 +01:00
}
}
2017-04-20 07:54:09 +02:00
2015-08-13 05:53:43 +02:00
UpdateTheUpdater ( ) ;
2017-04-20 07:54:09 +02:00
2017-05-13 07:54:29 +02:00
this . StartWindowsCheckBox . CheckedChanged + = new EventHandler ( this . StartWindowsCheckBox_CheckedChanged ) ;
2017-05-05 05:15:22 +02:00
new ToolTip ( ) . SetToolTip ( StartWindowsCheckBox , Properties . Resources . RunAtStartup ) ;
populateHoverTextDict ( ) ;
2017-05-13 07:54:29 +02:00
foreach ( Control control in fLPSettings . Controls )
{
if ( control . HasChildren )
{
foreach ( Control ctrl in control . Controls )
ctrl . MouseHover + = Items_MouseHover ;
}
control . MouseHover + = Items_MouseHover ;
}
2017-05-05 05:15:22 +02:00
}
private void populateHoverTextDict ( )
{
hoverTextDict . Clear ( ) ;
hoverTextDict [ linkUninstall ] = Properties . Resources . IfRemovingDS4Windows ;
hoverTextDict [ cBSwipeProfiles ] = Properties . Resources . TwoFingerSwipe ;
hoverTextDict [ cBQuickCharge ] = Properties . Resources . QuickCharge ;
hoverTextDict [ pnlXIPorts ] = Properties . Resources . XinputPorts ;
hoverTextDict [ lbUseXIPorts ] = Properties . Resources . XinputPorts ;
hoverTextDict [ nUDXIPorts ] = Properties . Resources . XinputPorts ;
hoverTextDict [ lbLastXIPort ] = Properties . Resources . XinputPorts ;
hoverTextDict [ cBCloseMini ] = Properties . Resources . CloseMinimize ;
hoverTextDict [ uacPictureBox ] = Properties . Resources . UACTask ;
hoverTextDict [ StartWindowsCheckBox ] = Properties . Resources . RunAtStartup ;
2015-08-13 05:53:43 +02:00
}
2017-05-02 07:05:58 +02:00
private Image AddUACShieldToImage ( Image image )
{
Bitmap shield = SystemIcons . Shield . ToBitmap ( ) ;
shield . MakeTransparent ( ) ;
Graphics g = Graphics . FromImage ( image ) ;
g . CompositingMode = System . Drawing . Drawing2D . CompositingMode . SourceOver ;
double aspectRatio = shield . Width / ( double ) shield . Height ;
int finalWidth = Convert . ToInt32 ( image . Height * aspectRatio ) ;
int finalHeight = Convert . ToInt32 ( image . Width / aspectRatio ) ;
g . DrawImage ( shield , new Rectangle ( 0 , 0 , finalWidth , finalHeight ) ) ;
return image ;
}
2017-04-29 10:19:45 +02:00
private void blankControllerTab ( )
{
bool nocontrollers = true ;
for ( Int32 Index = 0 , PadsLen = Pads . Length ; Index < PadsLen ; Index + + )
{
// Make sure a controller exists
if ( Index < ControlService . DS4_CONTROLLER_COUNT )
{
Pads [ Index ] . Text = "" ;
statPB [ Index ] . Visible = false ; toolTip1 . SetToolTip ( statPB [ Index ] , "" ) ;
Batteries [ Index ] . Text = Properties . Resources . NA ;
Pads [ Index ] . Text = Properties . Resources . Disconnected ;
Enable_Controls ( Index , false ) ;
}
}
lbNoControllers . Visible = nocontrollers ;
tLPControllers . Visible = ! nocontrollers ;
}
2015-08-13 05:53:43 +02:00
private async void UpdateTheUpdater ( )
{
if ( File . Exists ( exepath + "\\Update Files\\DS4Updater.exe" ) )
{
Process [ ] processes = Process . GetProcessesByName ( "DS4Updater" ) ;
while ( processes . Length > 0 )
{
2017-04-20 07:54:09 +02:00
await System . Threading . Tasks . Task . Delay ( 500 ) ;
2015-08-13 05:53:43 +02:00
}
2017-05-14 01:47:04 +02:00
2015-08-13 05:53:43 +02:00
File . Delete ( exepath + "\\DS4Updater.exe" ) ;
File . Move ( exepath + "\\Update Files\\DS4Updater.exe" , exepath + "\\DS4Updater.exe" ) ;
Directory . Delete ( exepath + "\\Update Files" ) ;
}
2014-06-09 01:41:36 +02:00
}
2014-11-20 20:03:18 +01:00
protected override void SetVisibleCore ( bool value )
{
if ( ! mAllowVisible )
{
value = false ;
if ( ! this . IsHandleCreated ) CreateHandle ( ) ;
}
2017-05-09 16:24:46 +02:00
2014-11-20 20:03:18 +01:00
base . SetVisibleCore ( value ) ;
}
private void showToolStripMenuItem_Click ( object sender , EventArgs e )
{
mAllowVisible = true ;
Show ( ) ;
}
2014-06-09 01:41:36 +02:00
public static string GetTopWindowName ( )
{
IntPtr hWnd = GetForegroundWindow ( ) ;
uint lpdwProcessId ;
GetWindowThreadProcessId ( hWnd , out lpdwProcessId ) ;
IntPtr hProcess = OpenProcess ( 0x0410 , false , lpdwProcessId ) ;
StringBuilder text = new StringBuilder ( 1000 ) ;
GetModuleFileNameEx ( hProcess , IntPtr . Zero , text , text . Capacity ) ;
CloseHandle ( hProcess ) ;
return text . ToString ( ) ;
2014-05-31 06:37:02 +02:00
}
2014-06-06 22:38:52 +02:00
private void OnPowerChange ( object s , PowerModeChangedEventArgs e )
{
switch ( e . Mode )
{
case PowerModes . Resume :
2017-05-09 16:24:46 +02:00
{
2014-08-23 22:52:20 +02:00
if ( btnStartStop . Text = = Properties . Resources . StartText & & wasrunning )
{
DS4LightBar . shuttingdown = false ;
wasrunning = false ;
2014-06-06 22:38:52 +02:00
btnStartStop_Clicked ( ) ;
2014-08-23 22:52:20 +02:00
}
2014-06-06 22:38:52 +02:00
break ;
2017-05-09 16:24:46 +02:00
}
2014-06-06 22:38:52 +02:00
case PowerModes . Suspend :
2017-05-09 16:24:46 +02:00
{
2014-08-17 00:09:15 +02:00
if ( btnStartStop . Text = = Properties . Resources . StopText )
2014-08-23 22:52:20 +02:00
{
DS4LightBar . shuttingdown = true ;
2014-06-06 22:38:52 +02:00
btnStartStop_Clicked ( ) ;
2014-08-23 22:52:20 +02:00
wasrunning = true ;
}
2014-06-06 22:38:52 +02:00
break ;
2017-05-09 16:24:46 +02:00
}
default : break ;
2014-06-06 22:38:52 +02:00
}
}
2014-06-02 05:19:04 +02:00
void Hotkeys ( object sender , EventArgs e )
2014-05-28 21:47:25 +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
if ( SwipeProfiles )
2017-04-25 03:26:34 +02:00
{
2014-06-21 20:00:28 +02:00
for ( int i = 0 ; i < 4 ; i + + )
{
2014-12-13 21:12:03 +01:00
string slide = Program . rootHub . TouchpadSlide ( i ) ;
2014-06-21 20:00:28 +02:00
if ( slide = = "left" )
2017-04-25 03:26:34 +02:00
{
2014-06-21 20:00:28 +02:00
if ( cbs [ i ] . SelectedIndex < = 0 )
cbs [ i ] . SelectedIndex = cbs [ i ] . Items . Count - 2 ;
else
cbs [ i ] . SelectedIndex - - ;
2017-04-25 03:26:34 +02:00
}
2014-06-21 20:00:28 +02:00
else if ( slide = = "right" )
2017-04-25 03:26:34 +02:00
{
2014-06-21 20:00:28 +02:00
if ( cbs [ i ] . SelectedIndex = = cbs [ i ] . Items . Count - 2 )
cbs [ i ] . SelectedIndex = 0 ;
else
cbs [ i ] . SelectedIndex + + ;
2017-04-25 03:26:34 +02:00
}
2014-06-21 20:00:28 +02:00
if ( slide . Contains ( "t" ) )
2014-08-17 00:09:15 +02:00
ShowNotification ( this , Properties . Resources . UsingProfile . Replace ( "*number*" , ( i + 1 ) . ToString ( ) ) . Replace ( "*Profile name*" , cbs [ i ] . Text ) ) ;
2014-06-21 20:00:28 +02:00
}
2017-04-25 03:26:34 +02:00
}
2014-06-06 22:38:52 +02:00
2017-05-09 16:24:46 +02:00
if ( bat ! = null & & bat . HasExited & & runningBat )
{
Process . Start ( "explorer.exe" ) ;
bat = null ;
runningBat = false ;
}
}
private void CheckAutoProfiles ( object sender , EventArgs e )
{
2014-06-06 22:38:52 +02:00
//Check for process for auto profiles
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 ( tempProfileProgram = = "null" )
2017-04-25 03:26:34 +02:00
{
2017-05-09 16:24:46 +02:00
string windowName = GetTopWindowName ( ) . ToLower ( ) . Replace ( '/' , '\\' ) ;
for ( int i = 0 , pathsLen = programpaths . Count ; i < pathsLen ; i + + )
2014-06-09 01:41:36 +02:00
{
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
string name = programpaths [ i ] . ToLower ( ) . Replace ( '/' , '\\' ) ;
2017-05-09 16:24:46 +02:00
if ( name = = windowName )
2014-06-09 01:41:36 +02:00
{
for ( int j = 0 ; j < 4 ; j + + )
2017-04-25 03:26:34 +02:00
{
2014-08-17 00:09:15 +02:00
if ( proprofiles [ j ] [ i ] ! = "(none)" & & proprofiles [ j ] [ i ] ! = Properties . Resources . noneProfile )
2014-07-26 01:17:45 +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
LoadTempProfile ( j , proprofiles [ j ] [ i ] , true , Program . rootHub ) ; //j is controller index, i is filename
if ( LaunchProgram [ j ] ! = string . Empty ) Process . Start ( LaunchProgram [ j ] ) ;
2014-07-26 01:17:45 +02:00
}
2017-04-25 03:26:34 +02:00
}
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
if ( turnOffTempProfiles [ i ] )
{
turnOffTemp = true ;
if ( btnStartStop . Text = = Properties . Resources . StopText )
{
btnStartStop_Clicked ( ) ;
hotkeysTimer . Start ( ) ;
2017-05-09 16:24:46 +02:00
autoProfilesTimer . Start ( ) ;
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
btnStartStop . Text = Properties . Resources . StartText ;
}
}
2017-04-25 03:26:34 +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
tempProfileProgram = name ;
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
break ;
2014-06-09 01:41:36 +02:00
}
}
2017-04-25 03:26:34 +02:00
}
2014-06-09 01:41:36 +02:00
else
{
2017-05-09 16:24:46 +02:00
string windowName = GetTopWindowName ( ) . ToLower ( ) . Replace ( '/' , '\\' ) ;
if ( tempProfileProgram ! = windowName )
2014-06-09 01:41:36 +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
tempProfileProgram = "null" ;
2014-06-09 01:41:36 +02:00
for ( int j = 0 ; j < 4 ; j + + )
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
LoadProfile ( j , false , Program . rootHub ) ;
2017-04-25 03:26:34 +02:00
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
if ( turnOffTemp )
{
turnOffTemp = false ;
if ( btnStartStop . Text = = Properties . Resources . StartText )
{
btnStartStop_Clicked ( ) ;
btnStartStop . Text = Properties . Resources . StopText ;
}
}
2014-06-09 01:41:36 +02:00
}
}
2017-04-25 03:26:34 +02:00
2017-05-09 16:24:46 +02:00
//GC.Collect();
2014-06-06 22:38:52 +02:00
}
2015-02-08 22:51:52 +01:00
2014-06-06 22:38:52 +02:00
public void LoadP ( )
{
XmlDocument doc = new XmlDocument ( ) ;
proprofiles = new List < string > [ 4 ] { new List < string > ( ) , new List < string > ( ) ,
new List < string > ( ) , new List < string > ( ) } ;
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
turnOffTempProfiles = new List < bool > ( ) ;
2014-06-06 22:38:52 +02:00
programpaths . 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
if ( ! File . Exists ( appdatapath + "\\Auto Profiles.xml" ) )
2014-06-06 22:38:52 +02:00
return ;
2017-05-14 01:47:04 +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
doc . Load ( appdatapath + "\\Auto Profiles.xml" ) ;
2014-06-06 22:38:52 +02:00
XmlNodeList programslist = doc . SelectNodes ( "Programs/Program" ) ;
foreach ( XmlNode x in programslist )
2015-02-08 22:51:52 +01:00
programpaths . Add ( x . Attributes [ "path" ] . Value ) ;
2017-05-14 01:47:04 +02:00
2014-06-06 22:38:52 +02:00
foreach ( string s in programpaths )
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
{
2014-06-06 22:38:52 +02:00
for ( int i = 0 ; i < 4 ; i + + )
{
proprofiles [ i ] . Add ( doc . SelectSingleNode ( "/Programs/Program[@path=\"" + s + "\"]"
+ "/Controller" + ( i + 1 ) ) . InnerText ) ;
}
2017-05-14 01:47:04 +02:00
Version 1.4.5
Added support for the New DS4 USB Adapater (Thanks to boganhobo and
Chamilsaan)
Implemented teokp's amazing fix for hide ds4 not working on the
anniversary update of Windows 10: when a controller fails to enter
exclusive mode, DS4Windows will ask for admin privilages to fix the
issue.
Now (near)unlimited Special Actions can be made from the previous limit
of 50
Special Action Xbox Game DVR is now no longer limited to Windows 10,
renamed multi action button: Assign a macro to single tap, double tap,
and holding down a button
Added option for White DS4Windows Icon in the notification tray (While
not merged from, thanks to tehmantra)
Added option to temporarily turn off DS4Windows when using a certain
program (togglable in the Auto Profiles Tab) (Same case as above but
thanks to dedChar to bring to light)
Fixed Options crashes in certain locales where decimal points are
repesented with commas, such as German (Thanks to kiliansch)
Added/Updated translations for many languauges, now including Japanese,
Slovenian, Hungarian, Greek, Finnish, Czech, Indonesian, and Ukrainian
2016-09-22 03:38:38 +02:00
XmlNode item = doc . SelectSingleNode ( "/Programs/Program[@path=\"" + s + "\"]"
+ "/TurnOff" ) ;
bool turnOff ;
if ( item ! = null & & bool . TryParse ( item . InnerText , out turnOff ) )
turnOffTempProfiles . Add ( turnOff ) ;
else
turnOffTempProfiles . Add ( false ) ;
}
2017-05-09 16:24:46 +02:00
int pathCount = programpaths . Count ;
bool timerEnabled = autoProfilesTimer . Enabled ;
if ( pathCount > 0 & & ! timerEnabled )
{
autoProfilesTimer . Start ( ) ;
}
else if ( pathCount = = 0 & & timerEnabled )
{
autoProfilesTimer . Stop ( ) ;
}
2014-05-28 04:49:58 +02:00
}
2017-05-09 16:24:46 +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
string originalsettingstext ;
2014-05-21 07:36:05 +02:00
private void CheckDrivers ( )
{
2015-03-15 19:16:01 +01:00
originalsettingstext = tabSettings . Text ;
2014-05-21 07:36:05 +02:00
bool deriverinstalled = false ;
2014-07-08 20:21:09 +02:00
try
2014-05-21 07:36:05 +02:00
{
2015-02-08 22:51:52 +01:00
ManagementObjectSearcher searcher = new ManagementObjectSearcher ( "SELECT * FROM Win32_PnPSignedDriver" ) ;
2014-07-08 20:21:09 +02:00
foreach ( ManagementObject obj in searcher . Get ( ) )
2014-05-21 07:36:05 +02:00
{
2014-07-08 20:21:09 +02:00
try
2014-05-21 07:36:05 +02:00
{
2014-07-08 20:21:09 +02:00
if ( obj . GetPropertyValue ( "DeviceName" ) . ToString ( ) = = "Scp Virtual Bus Driver" )
{
deriverinstalled = true ;
break ;
}
2014-05-21 07:36:05 +02:00
}
2014-07-08 20:21:09 +02:00
catch { }
}
if ( ! deriverinstalled )
{
2014-12-02 01:07:29 +01:00
Process p = new Process ( ) ;
p . StartInfo . FileName = Assembly . GetExecutingAssembly ( ) . Location ;
p . StartInfo . Arguments = "driverinstall" ;
p . StartInfo . Verb = "runas" ;
try { p . Start ( ) ; }
catch { }
2014-05-21 07:36:05 +02:00
}
}
2014-07-08 20:21:09 +02:00
catch
2014-05-21 07:36:05 +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
if ( ! File . Exists ( exepath + "\\Auto Profiles.xml" ) & & ! File . Exists ( appDataPpath + "\\Auto Profiles.xml" ) )
2014-07-08 20:21:09 +02:00
{
linkSetup . LinkColor = Color . Green ;
2014-09-15 04:37:14 +02:00
tabSettings . Text + = " (" + Properties . Resources . InstallDriver + ")" ;
2014-07-08 20:21:09 +02:00
}
2014-05-21 07:36:05 +02:00
}
2014-05-14 09:12:15 +02:00
}
2014-05-30 22:39:39 +02:00
2014-05-14 09:12:15 +02:00
private void Check_Version ( object sender , System . ComponentModel . AsyncCompletedEventArgs 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
FileVersionInfo fvi = FileVersionInfo . GetVersionInfo ( Assembly . GetExecutingAssembly ( ) . Location ) ;
string version = fvi . FileVersion ;
2017-05-13 07:54:29 +02:00
string newversion = File . ReadAllText ( appdatapath + "\\version.txt" ) . Trim ( ) ;
2014-11-14 20:44:50 +01:00
if ( version . Replace ( ',' , '.' ) . CompareTo ( newversion ) = = - 1 ) //CompareVersions();
2017-05-13 07:54:29 +02:00
{
if ( MessageBox . Show ( Properties . Resources . DownloadVersion . Replace ( "*number*" , newversion ) ,
Properties . Resources . DS4Update , MessageBoxButtons . YesNo , MessageBoxIcon . Question ) = = DialogResult . Yes )
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-08-18 07:18:46 +02:00
if ( ! File . Exists ( exepath + "\\DS4Updater.exe" ) | | ( File . Exists ( exepath + "\\DS4Updater.exe" )
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
& & ( FileVersionInfo . GetVersionInfo ( exepath + "\\DS4Updater.exe" ) . FileVersion . CompareTo ( "1.1.0.0" ) = = - 1 ) ) )
{
2017-03-20 00:13:09 +01:00
Uri url2 = new Uri ( "http://23.239.26.40/ds4windows/files/DS4Updater.exe" ) ;
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
WebClient wc2 = new WebClient ( ) ;
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
if ( appdatapath = = exepath )
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
wc2 . DownloadFile ( url2 , exepath + "\\DS4Updater.exe" ) ;
else
2014-05-16 00:10:17 +02:00
{
2014-08-17 00:09:15 +02:00
MessageBox . Show ( Properties . Resources . PleaseDownloadUpdater ) ;
2017-03-20 00:13:09 +01:00
Process . Start ( "http://23.239.26.40/ds4windows/files/DS4Updater.exe" ) ;
2014-05-16 00:10:17 +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
}
2017-05-13 07:54:29 +02:00
2014-08-18 07:18:46 +02:00
Process p = new Process ( ) ;
p . StartInfo . FileName = exepath + "\\DS4Updater.exe" ;
2015-03-15 19:16:01 +01:00
if ( ! cBDownloadLangauge . Checked )
2015-02-08 22:51:52 +01:00
p . StartInfo . Arguments = "-skipLang" ;
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
if ( AdminNeeded ( ) )
2014-08-18 07:18:46 +02:00
p . StartInfo . Verb = "runas" ;
2017-05-13 07:54:29 +02:00
2014-12-02 01:07:29 +01:00
try { p . Start ( ) ; Close ( ) ; }
catch { }
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-14 09:12:15 +02: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
File . Delete ( appdatapath + "\\version.txt" ) ;
2017-05-13 07:54:29 +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
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
File . Delete ( appdatapath + "\\version.txt" ) ;
2014-03-28 02:50:40 +01:00
}
2014-06-09 01:41:36 +02:00
2014-04-27 21:32:09 +02:00
public void RefreshProfiles ( )
{
try
{
2014-05-28 21:47:25 +02:00
profilenames . 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
string [ ] profiles = Directory . GetFiles ( appdatapath + @"\Profiles\" ) ;
2017-05-14 01:47:04 +02:00
foreach ( string s in profiles )
2017-05-13 07:54:29 +02:00
{
2014-04-29 03:14:01 +02:00
if ( s . EndsWith ( ".xml" ) )
2014-05-21 07:36:05 +02:00
profilenames . Add ( Path . GetFileNameWithoutExtension ( s ) ) ;
2017-05-13 07:54:29 +02:00
}
2014-05-30 22:39:39 +02:00
lBProfiles . Items . Clear ( ) ;
lBProfiles . Items . AddRange ( profilenames . ToArray ( ) ) ;
2014-09-15 04:37:14 +02:00
if ( lBProfiles . Items . Count = = 0 )
{
2015-12-18 07:25:51 +01:00
SaveProfile ( 0 , "Default" ) ;
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
ProfilePath [ 0 ] = "Default" ;
2014-09-15 04:37:14 +02:00
RefreshProfiles ( ) ;
return ;
}
2014-04-27 21:32:09 +02:00
for ( int i = 0 ; i < 4 ; i + + )
{
cbs [ i ] . Items . Clear ( ) ;
2014-04-29 03:14:01 +02:00
shortcuts [ i ] . DropDownItems . Clear ( ) ;
cbs [ i ] . Items . AddRange ( profilenames . ToArray ( ) ) ;
foreach ( string s in profilenames )
2014-09-15 04:37:14 +02:00
shortcuts [ i ] . DropDownItems . Add ( s ) ;
2017-05-13 07:54:29 +02:00
for ( int j = 0 , itemCount = cbs [ i ] . Items . Count ; j < itemCount ; j + + )
{
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
if ( cbs [ i ] . Items [ j ] . ToString ( ) = = Path . GetFileNameWithoutExtension ( ProfilePath [ i ] ) )
2014-04-27 21:32:09 +02:00
{
cbs [ i ] . SelectedIndex = j ;
2014-04-29 03:14:01 +02:00
( ( ToolStripMenuItem ) shortcuts [ i ] . DropDownItems [ j ] ) . 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
ProfilePath [ i ] = cbs [ i ] . Text ;
2014-08-17 00:09:15 +02:00
shortcuts [ i ] . Text = Properties . Resources . ContextEdit . Replace ( "*number*" , ( i + 1 ) . ToString ( ) ) ;
ebns [ i ] . Text = Properties . Resources . EditProfile ;
2014-04-27 21:32:09 +02:00
break ;
2014-04-29 03:14:01 +02:00
}
2014-05-06 20:49:18 +02:00
else
{
2014-08-17 00:09:15 +02:00
cbs [ i ] . Text = "(" + Properties . Resources . NoProfileLoaded + ")" ;
shortcuts [ i ] . Text = Properties . Resources . ContextNew . Replace ( "*number*" , ( i + 1 ) . ToString ( ) ) ;
ebns [ i ] . Text = Properties . Resources . New ;
2014-05-06 20:49:18 +02:00
}
2017-05-13 07:54:29 +02:00
}
2014-04-27 21:32:09 +02:00
}
}
catch ( DirectoryNotFoundException )
{
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
Directory . CreateDirectory ( appdatapath + @"\Profiles\" ) ;
2015-12-18 07:25:51 +01:00
SaveProfile ( 0 , "Default" ) ;
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
ProfilePath [ 0 ] = "Default" ;
2014-09-15 04:37:14 +02:00
RefreshProfiles ( ) ;
return ;
}
finally
{
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 ( ! ( cbs [ 0 ] . Items . Count > 0 & & cbs [ 0 ] . Items [ cbs [ 0 ] . Items . Count - 1 ] . ToString ( ) = = "+" + Properties . Resources . PlusNewProfile ) )
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
{
for ( int i = 0 ; i < 4 ; i + + )
{
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
cbs [ i ] . Items . Add ( "+" + Properties . Resources . PlusNewProfile ) ;
2014-09-15 04:37:14 +02:00
shortcuts [ i ] . DropDownItems . Add ( "-" ) ;
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
shortcuts [ i ] . DropDownItems . Add ( "+" + Properties . Resources . PlusNewProfile ) ;
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
}
2014-09-15 04:37:14 +02:00
RefreshAutoProfilesPage ( ) ;
2014-06-02 05:19:04 +02:00
}
}
2014-04-27 21:32:09 +02:00
}
2014-05-19 07:55:12 +02:00
2014-06-09 01:41:36 +02:00
2014-06-06 22:38:52 +02:00
public void RefreshAutoProfilesPage ( )
{
tabAutoProfiles . Controls . Clear ( ) ;
2014-06-09 01:41:36 +02:00
WP = new WinProgs ( profilenames . ToArray ( ) , this ) ;
2014-06-06 22:38:52 +02:00
WP . TopLevel = false ;
2017-05-13 07:54:29 +02:00
WP . FormBorderStyle = FormBorderStyle . None ;
2014-06-06 22:38:52 +02:00
WP . Visible = true ;
WP . Dock = DockStyle . Fill ;
tabAutoProfiles . Controls . Add ( WP ) ;
}
2017-04-25 03:26:34 +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
protected void LogDebug ( DateTime Time , String Data , bool warning )
2014-03-28 02:50:40 +01:00
{
2014-05-19 07:55:12 +02:00
if ( lvDebug . InvokeRequired )
{
LogDebugDelegate d = new LogDebugDelegate ( LogDebug ) ;
try
{
2017-04-25 03:26:34 +02:00
// Make sure to invoke method asynchronously instead of waiting for result
this . BeginInvoke ( d , new object [ ] { Time , Data , warning } ) ;
//this.Invoke(d, new object[] { Time, Data, warning });
2014-05-19 07:55:12 +02:00
}
catch { }
}
else
{
2014-05-21 07:36:05 +02:00
String Posted = Time . ToString ( "G" ) ;
2014-05-19 07:55:12 +02:00
lvDebug . Items . Add ( new ListViewItem ( new String [ ] { Posted , Data } ) ) . EnsureVisible ( ) ;
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 ( warning ) lvDebug . Items [ lvDebug . Items . Count - 1 ] . ForeColor = Color . Red ;
2017-04-25 03:26:34 +02:00
// Added alternative
2014-05-19 07:55:12 +02:00
lbLastMessage . Text = Data ;
Version 1.4.222
Added Press/Toggle Key to Special Actions, you can hold a trigger to
hold a key or toggle a key with one set of buttons, and untoggle it by
pressing or releasing another set of buttons
Added Disconnect BT to Special Actions, PS+Options to d/c is now added
to Special actions and can be enabled for each profile. You can now set
Disconnect BT to any control(s) and how long you need to hold the
control(s) to take affect
Added Partial German Translation (Thanks Michél)
Added 95% Finished Russian Translation (Thanks overclockers.ru members:
KoNoRIMCI & Sr_psycho)
Added Partial Italian Translation (Thanks Giulio)
Updates to the translations sheets, they should now have every bit of
text in DS4Windows, minus the controls of the controller
English Spelling fixes
Main/Starting tab only shows info for connected controllers, and context
menu only shows options for connected controllers.
Mouse wheel scrolling with analog sticks/triggers/gyro, the mouse now
scrolls smoothly
Slightly reworked analog mouse movement + mouse acceleration (not as
janky anymore)
When starting DS4Windows, if no controllers are connected, DS4Windows
defaults to the profile tab
Certain log warnings (Like unable to get controller exclusively) shows
up in red
Easter egg: try pressing a few buttons in sequence while in the log tab
Fixed Start Profile with TP off being unchecked next time a profile is
opened
Other minor Bug Fixes, such as clearing the log then moving to a new tab
crashing DS4W
2015-01-17 21:16:48 +01:00
lbLastMessage . ForeColor = ( warning ? Color . Red : SystemColors . GrayText ) ;
2014-05-19 07:55:12 +02:00
}
}
protected void ShowNotification ( object sender , DebugEventArgs args )
{
2017-04-25 03:26:34 +02:00
if ( this . InvokeRequired )
2014-05-28 04:49:58 +02:00
{
2017-04-25 03:26:34 +02:00
NotificationDelegate d = new NotificationDelegate ( ShowNotification ) ;
try
{
// Make sure to invoke method asynchronously instead of waiting for result
this . BeginInvoke ( d , new object [ ] { sender , args } ) ;
}
catch { }
}
else
{
if ( Form . ActiveForm ! = this & & ( Notifications = = 2 | | ( Notifications = = 1 & & args . Warning ) | | sender ! = null ) )
{
this . notifyIcon1 . BalloonTipText = args . Data ;
notifyIcon1 . BalloonTipTitle = "DS4Windows" ;
notifyIcon1 . ShowBalloonTip ( 1 ) ;
}
2014-05-28 04:49:58 +02:00
}
2014-05-19 07:55:12 +02:00
}
2014-05-30 22:39:39 +02:00
protected void ShowNotification ( object sender , string text )
{
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
if ( Form . ActiveForm ! = this & & Notifications = = 2 )
2014-05-30 22:39:39 +02:00
{
this . notifyIcon1 . BalloonTipText = text ;
notifyIcon1 . BalloonTipTitle = "DS4Windows" ;
notifyIcon1 . ShowBalloonTip ( 1 ) ;
}
}
2014-05-19 07:55:12 +02:00
protected void Form_Resize ( object sender , EventArgs e )
{
if ( FormWindowState . Minimized = = this . WindowState )
{
this . Hide ( ) ;
this . ShowInTaskbar = false ;
2014-10-21 20:31:36 +02:00
this . FormBorderStyle = FormBorderStyle . None ;
2014-05-19 07:55:12 +02:00
}
2014-05-21 07:36:05 +02:00
2014-05-19 07:55:12 +02:00
else if ( FormWindowState . Normal = = this . WindowState )
{
2014-11-20 20:03:18 +01:00
//mAllowVisible = true;
2014-05-19 07:55:12 +02:00
this . Show ( ) ;
this . ShowInTaskbar = true ;
2014-10-21 20:31:36 +02:00
this . FormBorderStyle = FormBorderStyle . Sizable ;
2014-05-19 07:55:12 +02:00
}
2017-05-09 16:24:46 +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
chData . AutoResize ( ColumnHeaderAutoResizeStyle . HeaderSize ) ;
2014-03-28 02:50:40 +01:00
}
protected void btnStartStop_Click ( object sender , EventArgs e )
2014-03-29 06:29:08 +01:00
{
btnStartStop_Clicked ( ) ;
}
2017-05-09 16:24:46 +02:00
2014-08-23 22:52:20 +02:00
public void btnStartStop_Clicked ( bool log = true )
2014-03-28 02:50:40 +01:00
{
2014-06-21 20:00:28 +02:00
if ( btnStartStop . Text = = Properties . Resources . StartText )
2014-05-24 01:44:30 +02:00
{
2014-12-13 21:12:03 +01:00
Program . rootHub . Start ( log ) ;
2017-05-09 16:24:46 +02:00
if ( SwipeProfiles & & ! hotkeysTimer . Enabled )
{
hotkeysTimer . Start ( ) ;
}
if ( programpaths . Count > 0 & & ! autoProfilesTimer . Enabled )
{
autoProfilesTimer . Start ( ) ;
}
2014-06-21 20:00:28 +02:00
btnStartStop . Text = Properties . Resources . StopText ;
2014-05-24 01:44:30 +02:00
}
2014-06-21 20:00:28 +02:00
else if ( btnStartStop . Text = = Properties . Resources . StopText )
2015-02-08 22:51:52 +01:00
{
2017-05-01 11:29:19 +02:00
blankControllerTab ( ) ;
2014-12-13 21:12:03 +01:00
Program . rootHub . Stop ( log ) ;
2014-11-18 22:23:41 +01:00
hotkeysTimer . Stop ( ) ;
2017-05-09 16:24:46 +02:00
autoProfilesTimer . Stop ( ) ;
2014-06-21 20:00:28 +02:00
btnStartStop . Text = Properties . Resources . StartText ;
2017-05-09 12:11:50 +02:00
blankControllerTab ( ) ;
2014-03-28 02:50:40 +01:00
}
2017-05-09 12:11:50 +02:00
2014-09-02 01:23:02 +02:00
startToolStripMenuItem . Text = btnStartStop . Text ;
2014-03-28 02:50:40 +01:00
}
2017-05-09 16:24:46 +02:00
2014-03-28 02:50:40 +01:00
protected void btnClear_Click ( object sender , EventArgs e )
{
lvDebug . Items . Clear ( ) ;
lbLastMessage . Text = string . Empty ;
}
2017-05-01 20:28:07 +02:00
bool inHotPlug = false ;
2014-03-28 02:50:40 +01:00
protected override void WndProc ( ref Message m )
{
2017-05-02 15:29:46 +02:00
try
2014-03-28 02:50:40 +01:00
{
2017-05-02 15:29:46 +02:00
if ( m . Msg = = ScpDevice . WM_DEVICECHANGE )
2014-03-28 02:50:40 +01:00
{
2017-05-02 15:29:46 +02:00
if ( runHotPlug )
2014-03-28 02:50:40 +01:00
{
2017-04-26 05:07:02 +02:00
Int32 Type = m . WParam . ToInt32 ( ) ;
2017-05-01 20:28:07 +02:00
InnerHotplug2 ( ) ;
2014-03-28 02:50:40 +01:00
}
}
}
2017-05-02 15:29:46 +02:00
catch { }
if ( m . Msg = = WM_QUERYENDSESSION )
systemShutdown = true ;
2014-03-28 02:50:40 +01:00
2014-06-02 19:29:38 +02:00
// If this is WM_QUERYENDSESSION, the closing event should be
// raised in the base WndProc.
2015-11-28 06:47:26 +01:00
try { base . WndProc ( ref m ) ; }
catch { }
2014-03-28 02:50:40 +01:00
}
2015-02-08 22:51:52 +01:00
2017-05-01 20:28:07 +02:00
protected async void InnerHotplug2 ( )
{
2017-05-02 03:32:23 +02:00
await System . Threading . Tasks . Task . Delay ( 50 ) ;
2017-05-01 20:28:07 +02:00
if ( inHotPlug )
{
await System . Threading . Tasks . Task . Run ( ( ) = > { while ( inHotPlug ) { System . Threading . Thread . Sleep ( 50 ) ; } } ) ;
}
lock ( this )
{
inHotPlug = true ;
Program . rootHub . HotPlug ( ) ;
inHotPlug = false ;
}
}
2017-04-25 11:24:14 +02:00
protected void BatteryStatusUpdate ( object sender , BatteryReportArgs args )
{
if ( this . InvokeRequired )
{
try
{
BatteryStatusDelegate d = new BatteryStatusDelegate ( BatteryStatusUpdate ) ;
this . BeginInvoke ( d , new object [ ] { sender , args } ) ;
}
catch { }
}
else
{
string battery ;
int level = args . getLevel ( ) ;
2017-05-17 09:57:06 +02:00
bool charging = args . isCharging ( ) ;
if ( charging )
{
if ( level > = 100 )
battery = Properties . Resources . Full ;
else
battery = level + "%+" ;
}
2017-04-25 11:24:14 +02:00
else
2017-05-17 09:57:06 +02:00
{
battery = level + "%" ;
}
2017-04-25 11:24:14 +02:00
Batteries [ args . getIndex ( ) ] . Text = battery ;
}
}
2017-04-29 10:19:45 +02:00
protected void DeviceStatusChanged ( object sender , DeviceStatusChangeEventArgs args )
{
if ( this . InvokeRequired )
{
DeviceStatusChangedDelegate d = new DeviceStatusChangedDelegate ( DeviceStatusChanged ) ;
this . BeginInvoke ( d , new object [ ] { sender , args } ) ;
}
else
{
bool nocontrollers = true ;
for ( int i = 0 , arlen = Program . rootHub . DS4Controllers . Length ; nocontrollers & & i < arlen ; i + + )
{
DS4Device dev = Program . rootHub . DS4Controllers [ i ] ;
if ( dev ! = null )
{
nocontrollers = false ;
}
}
string tooltip = "DS4Windows v" + FileVersionInfo . GetVersionInfo ( Assembly . GetExecutingAssembly ( ) . Location ) . FileVersion ;
int Index = args . getIndex ( ) ;
if ( Index > = 0 & & Index < ControlService . DS4_CONTROLLER_COUNT )
{
Pads [ Index ] . Text = Program . rootHub . getDS4MacAddress ( Index ) ;
switch ( Program . rootHub . getDS4Status ( Index ) )
{
case "USB" : statPB [ Index ] . Visible = true ; statPB [ Index ] . Image = Properties . Resources . USB ; toolTip1 . SetToolTip ( statPB [ Index ] , "" ) ; break ;
case "BT" : statPB [ Index ] . Visible = true ; statPB [ Index ] . Image = Properties . Resources . BT ; toolTip1 . SetToolTip ( statPB [ Index ] , "Right click to disconnect" ) ; break ;
case "SONYWA" : statPB [ Index ] . Visible = true ; statPB [ Index ] . Image = Properties . Resources . BT ; toolTip1 . SetToolTip ( statPB [ Index ] , "Right click to disconnect" ) ; break ;
default : statPB [ Index ] . Visible = false ; toolTip1 . SetToolTip ( statPB [ Index ] , "" ) ; break ;
}
Batteries [ Index ] . Text = Program . rootHub . getDS4Battery ( Index ) ;
if ( Pads [ Index ] . Text ! = String . Empty )
{
if ( runningBat )
{
SendKeys . Send ( "A" ) ;
runningBat = false ;
}
Pads [ Index ] . Enabled = true ;
if ( Pads [ Index ] . Text ! = Properties . Resources . Connecting )
{
Enable_Controls ( Index , true ) ;
}
}
else
{
Pads [ Index ] . Text = Properties . Resources . Disconnected ;
Enable_Controls ( Index , false ) ;
}
if ( Program . rootHub . getShortDS4ControllerInfo ( Index ) ! = Properties . Resources . NoneText )
tooltip + = "\n" + ( Index + 1 ) + ": " + Program . rootHub . getShortDS4ControllerInfo ( Index ) ; // Carefully stay under the 63 character limit.
}
lbNoControllers . Visible = nocontrollers ;
tLPControllers . Visible = ! nocontrollers ;
if ( tooltip . Length > 63 )
notifyIcon1 . Text = tooltip . Substring ( 0 , 63 ) ;
else
notifyIcon1 . Text = tooltip ;
}
}
2017-04-26 10:00:05 +02:00
protected void ControllerRemovedChange ( object sender , ControllerRemovedArgs args )
{
if ( this . InvokeRequired )
{
try
{
ControllerRemovedDelegate d = new ControllerRemovedDelegate ( ControllerRemovedChange ) ;
this . BeginInvoke ( d , new object [ ] { sender , args } ) ;
}
catch { }
}
else
{
int devIndex = args . getIndex ( ) ;
Pads [ devIndex ] . Text = Properties . Resources . Disconnected ;
Enable_Controls ( devIndex , false ) ;
statPB [ devIndex ] . Visible = false ;
toolTip1 . SetToolTip ( statPB [ devIndex ] , "" ) ;
DS4Device [ ] devices = Program . rootHub . DS4Controllers ;
int controllerLen = devices . Length ;
bool nocontrollers = true ;
for ( Int32 i = 0 , PadsLen = Pads . Length ; nocontrollers & & i < PadsLen ; i + + )
{
DS4Device d = devices [ i ] ;
if ( d ! = null )
{
nocontrollers = false ;
}
}
lbNoControllers . Visible = nocontrollers ;
tLPControllers . Visible = ! nocontrollers ;
}
}
2017-05-17 09:57:06 +02:00
/* TODO: Possible remove method */
2017-05-13 07:54:29 +02:00
/ * protected void ControllerStatusChange ( object sender , EventArgs e )
2017-04-26 10:00:05 +02:00
{
if ( InvokeRequired )
Invoke ( new ControllerStatusChangedDelegate ( ControllerStatusChange ) , new object [ ] { sender , e } ) ;
else
ControllerStatusChanged ( ) ;
}
2017-05-13 07:54:29 +02:00
* /
2017-04-26 10:00:05 +02:00
2017-05-17 09:57:06 +02:00
/* TODO: Possible remove method */
2017-05-13 07:54:29 +02:00
/ * protected void ControllerStatusChanged ( )
2014-03-29 06:29:08 +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
String tooltip = "DS4Windows v" + FileVersionInfo . GetVersionInfo ( Assembly . GetExecutingAssembly ( ) . Location ) . FileVersion ;
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 nocontrollers = true ;
2017-04-24 11:43:56 +02:00
DS4Device [ ] devices = Program . rootHub . DS4Controllers ;
int controllerLen = devices . Length ;
2017-04-22 16:00:12 +02:00
for ( Int32 Index = 0 , PadsLen = Pads . Length ; Index < PadsLen ; Index + + )
2014-03-28 02:50:40 +01:00
{
2017-04-24 11:43:56 +02:00
// Make sure a controller exists
if ( Index < controllerLen )
2014-05-30 22:39:39 +02:00
{
2017-04-24 11:43:56 +02:00
Pads [ Index ] . Text = Program . rootHub . getDS4MacAddress ( Index ) ;
DS4Device d = devices [ Index ] ;
2017-04-22 16:00:12 +02:00
2017-04-24 11:43:56 +02:00
switch ( Program . rootHub . getDS4Status ( Index ) )
2015-08-13 05:53:43 +02:00
{
2017-04-24 11:43:56 +02:00
case "USB" : statPB [ Index ] . Visible = true ; statPB [ Index ] . Image = Properties . Resources . USB ; toolTip1 . SetToolTip ( statPB [ Index ] , "" ) ; break ;
case "BT" : statPB [ Index ] . Visible = true ; statPB [ Index ] . Image = Properties . Resources . BT ; toolTip1 . SetToolTip ( statPB [ Index ] , "Right click to disconnect" ) ; break ;
case "SONYWA" : statPB [ Index ] . Visible = true ; statPB [ Index ] . Image = Properties . Resources . BT ; toolTip1 . SetToolTip ( statPB [ Index ] , "Right click to disconnect" ) ; break ;
default : statPB [ Index ] . Visible = false ; toolTip1 . SetToolTip ( statPB [ Index ] , "" ) ; break ;
2015-08-13 05:53:43 +02:00
}
2017-04-24 11:43:56 +02:00
Batteries [ Index ] . Text = Program . rootHub . getDS4Battery ( Index ) ;
if ( Pads [ Index ] . Text ! = String . Empty )
2014-05-28 04:49:58 +02:00
{
2017-04-24 11:43:56 +02:00
if ( runningBat )
{
SendKeys . Send ( "A" ) ;
runningBat = false ;
}
Pads [ Index ] . Enabled = true ;
nocontrollers = false ;
if ( Pads [ Index ] . Text ! = Properties . Resources . Connecting )
{
Enable_Controls ( Index , true ) ;
}
2014-05-28 04:49:58 +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
else
2017-04-24 11:43:56 +02:00
{
Pads [ Index ] . Text = Properties . Resources . Disconnected ;
Enable_Controls ( Index , false ) ;
}
//if (((Index + 1) + ": " + Program.rootHub.getShortDS4ControllerInfo(Index)).Length > 50)
//MessageBox.Show(((Index + 1) + ": " + Program.rootHub.getShortDS4ControllerInfo(Index)).Length.ToString());
if ( Program . rootHub . getShortDS4ControllerInfo ( Index ) ! = Properties . Resources . NoneText )
tooltip + = "\n" + ( Index + 1 ) + ": " + Program . rootHub . getShortDS4ControllerInfo ( Index ) ; // Carefully stay under the 63 character limit.
2014-03-28 02:50:40 +01:00
}
}
2017-04-22 16:00:12 +02:00
2015-02-08 22:51:52 +01:00
lbNoControllers . Visible = nocontrollers ;
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
tLPControllers . Visible = ! nocontrollers ;
2014-08-18 07:18:46 +02:00
if ( tooltip . Length > 63 )
2015-02-08 22:51:52 +01:00
notifyIcon1 . Text = tooltip . Substring ( 0 , 63 ) ;
2014-08-18 07:18:46 +02:00
else
notifyIcon1 . Text = tooltip ;
2014-03-28 02:50:40 +01:00
}
2017-05-13 07:54:29 +02:00
* /
2015-02-08 22:51:52 +01:00
2014-09-02 01:23:02 +02:00
private void pBStatus_MouseClick ( object sender , MouseEventArgs e )
{
int i = Int32 . Parse ( ( ( PictureBox ) sender ) . Tag . ToString ( ) ) ;
2017-05-13 07:54:29 +02:00
DS4Device d = Program . rootHub . DS4Controllers [ i ] ;
if ( d ! = null )
2017-04-06 03:37:38 +02:00
{
2017-05-13 07:54:29 +02:00
if ( e . Button = = MouseButtons . Right & & Program . rootHub . getDS4Status ( i ) = = "BT" & & ! d . Charging )
{
d . DisconnectBT ( ) ;
}
else if ( e . Button = = MouseButtons . Right & &
Program . rootHub . getDS4Status ( i ) = = "SONYWA" & & ! d . Charging )
{
d . DisconnectDongle ( ) ;
}
2017-04-06 03:37:38 +02:00
}
2014-09-02 01:23:02 +02:00
}
2014-05-31 06:37:02 +02:00
private void Enable_Controls ( int device , bool on )
{
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
Pads [ device ] . Visible = on ;
ebns [ device ] . Visible = on ;
2015-11-28 06:47:26 +01:00
lights [ device ] . Visible = on ;
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
cbs [ device ] . Visible = on ;
shortcuts [ device ] . Visible = on ;
Batteries [ device ] . Visible = on ;
2014-05-31 06:37:02 +02:00
}
2015-02-08 22:51:52 +01:00
2017-05-17 09:57:06 +02:00
/* TODO: Remove method in future */
/ * void ScpForm_Report ( object sender , EventArgs e )
2014-05-30 22:39:39 +02:00
{
if ( InvokeRequired )
Invoke ( new HotKeysDelegate ( Hotkeys ) , new object [ ] { sender , e } ) ;
else
Hotkeys ( sender , e ) ;
}
2017-05-17 09:57:06 +02:00
* /
2014-05-30 22:39:39 +02:00
2015-02-08 22:51:52 +01:00
protected void On_Debug ( object sender , DebugEventArgs e )
2014-03-28 02:50:40 +01:00
{
2014-12-17 19:29:22 +01:00
//logWriter.WriteLine(e.Time + ":\t" + e.Data);
//logWriter.Flush();
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
LogDebug ( e . Time , e . Data , e . Warning ) ;
2014-03-28 02:50:40 +01:00
}
2014-05-30 22:39:39 +02:00
private void lBProfiles_MouseDoubleClick ( object sender , MouseEventArgs e )
{
if ( lBProfiles . SelectedIndex > = 0 )
2015-02-08 22:51:52 +01:00
ShowOptions ( 4 , lBProfiles . SelectedItem . ToString ( ) ) ;
2014-05-30 22:39:39 +02:00
}
2014-05-31 06:37:02 +02:00
private void lBProfiles_KeyDown ( object sender , KeyEventArgs e )
{
2015-12-13 22:30:54 +01:00
if ( lBProfiles . SelectedIndex > = 0 & & ! opt . Visible )
2014-05-31 06:37:02 +02:00
{
if ( e . KeyValue = = 13 )
ShowOptions ( 4 , lBProfiles . SelectedItem . ToString ( ) ) ;
2017-05-13 07:54:29 +02:00
else if ( e . KeyValue = = 46 )
2014-05-31 06:37:02 +02:00
tsBDeleteProfle_Click ( this , e ) ;
2017-05-13 07:54:29 +02:00
else if ( e . KeyValue = = 68 & & e . Modifiers = = Keys . Control )
2014-05-31 06:37:02 +02:00
tSBDupProfile_Click ( this , e ) ;
}
}
2014-05-31 19:27:43 +02:00
private void assignToController1ToolStripMenuItem_Click ( object sender , EventArgs e )
{
cbs [ 0 ] . SelectedIndex = lBProfiles . SelectedIndex ;
}
private void assignToController2ToolStripMenuItem_Click ( object sender , EventArgs e )
{
cbs [ 1 ] . SelectedIndex = lBProfiles . SelectedIndex ;
}
private void assignToController3ToolStripMenuItem_Click ( object sender , EventArgs e )
{
cbs [ 2 ] . SelectedIndex = lBProfiles . SelectedIndex ;
}
private void assignToController4ToolStripMenuItem_Click ( object sender , EventArgs e )
{
cbs [ 3 ] . SelectedIndex = lBProfiles . SelectedIndex ;
}
private void tsBNewProfile_Click ( object sender , EventArgs e ) //Also used for context menu
2014-05-30 22:39:39 +02:00
{
ShowOptions ( 4 , "" ) ;
}
private void tsBNEditProfile_Click ( object sender , EventArgs e )
{
if ( lBProfiles . SelectedIndex > = 0 )
ShowOptions ( 4 , lBProfiles . SelectedItem . ToString ( ) ) ;
}
private void tsBDeleteProfle_Click ( object sender , EventArgs e )
{
if ( lBProfiles . SelectedIndex > = 0 )
{
string filename = lBProfiles . SelectedItem . ToString ( ) ;
2017-05-13 07:54:29 +02:00
if ( MessageBox . Show ( Properties . Resources . ProfileCannotRestore . Replace ( "*Profile name*" , "\"" + filename + "\"" ) ,
Properties . Resources . DeleteProfile ,
MessageBoxButtons . YesNo , MessageBoxIcon . Question ) = = DialogResult . Yes )
2014-05-30 22:39:39 +02:00
{
2017-05-13 07:54:29 +02:00
File . Delete ( appdatapath + @"\Profiles\" + filename + ".xml" ) ;
2014-05-30 22:39:39 +02:00
RefreshProfiles ( ) ;
}
}
}
2015-02-08 22:51:52 +01:00
2014-05-30 22:39:39 +02:00
private void tSBDupProfile_Click ( object sender , EventArgs e )
{
string filename = "" ;
if ( lBProfiles . SelectedIndex > = 0 )
2015-02-08 22:51:52 +01:00
{
2014-05-30 22:39:39 +02:00
filename = lBProfiles . SelectedItem . ToString ( ) ;
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
DupBox MTB = new DupBox ( filename , this ) ;
2014-05-30 22:39:39 +02:00
MTB . TopLevel = false ;
MTB . Dock = DockStyle . Top ;
MTB . Visible = true ;
2017-05-13 07:54:29 +02:00
MTB . FormBorderStyle = FormBorderStyle . None ;
2014-05-30 22:39:39 +02:00
tabProfiles . Controls . Add ( MTB ) ;
lBProfiles . SendToBack ( ) ;
toolStrip1 . SendToBack ( ) ;
toolStrip1 . Enabled = false ;
lBProfiles . Enabled = false ;
MTB . FormClosed + = delegate { toolStrip1 . Enabled = true ; lBProfiles . Enabled = true ; } ;
}
}
2014-05-31 06:37:02 +02:00
private void tSBImportProfile_Click ( 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
if ( appdatapath = = Directory . GetParent ( Assembly . GetExecutingAssembly ( ) . Location ) . FullName )
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
openProfiles . InitialDirectory = Environment . GetFolderPath ( Environment . SpecialFolder . ApplicationData ) + "\\DS4Tool" + @"\Profiles\" ;
else
openProfiles . InitialDirectory = Directory . GetParent ( Assembly . GetExecutingAssembly ( ) . Location ) . FullName + @"\Profiles\" ;
2017-05-13 07:54:29 +02:00
if ( openProfiles . ShowDialog ( ) = = DialogResult . OK )
2014-05-31 06:37:02 +02:00
{
string [ ] files = openProfiles . FileNames ;
2017-05-13 07:54:29 +02:00
for ( int i = 0 , arlen = files . Length ; i < arlen ; i + + )
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
File . Copy ( openProfiles . FileNames [ i ] , appdatapath + "\\Profiles\\" + Path . GetFileName ( files [ i ] ) , true ) ;
2017-05-13 07:54:29 +02:00
2014-05-31 06:37:02 +02:00
RefreshProfiles ( ) ;
}
}
private void tSBExportProfile_Click ( object sender , EventArgs e )
{
if ( lBProfiles . SelectedIndex > = 0 )
{
Stream stream ;
2015-11-28 06:47:26 +01:00
Stream profile = new StreamReader ( appdatapath + "\\Profiles\\" + lBProfiles . SelectedItem . ToString ( ) + ".xml" ) . BaseStream ;
2017-05-13 07:54:29 +02:00
if ( saveProfiles . ShowDialog ( ) = = DialogResult . OK )
2017-04-28 20:57:33 +02:00
{
2014-05-31 06:37:02 +02:00
if ( ( stream = saveProfiles . OpenFile ( ) ) ! = null )
{
profile . CopyTo ( stream ) ;
profile . Close ( ) ;
stream . Close ( ) ;
}
2017-04-28 20:57:33 +02:00
}
2014-05-31 06:37:02 +02:00
}
}
2014-06-21 20:00:28 +02:00
2014-05-12 07:48:50 +02:00
private void ShowOptions ( int devID , string profile )
2014-03-28 02:50:40 +01:00
{
2014-06-21 20:00:28 +02:00
Show ( ) ;
2017-05-13 07:54:29 +02:00
tabMain . SelectedIndex = 1 ;
2014-06-21 20:00:28 +02:00
WindowState = FormWindowState . Normal ;
toolStrip1 . Enabled = false ;
tSOptions . Visible = true ;
toolStrip1 . Visible = false ;
if ( profile ! = "" )
tSTBProfile . Text = profile ;
else
2014-08-17 00:09:15 +02:00
tSTBProfile . Text = "<" + Properties . Resources . TypeProfileName + ">" ;
2017-05-11 17:13:51 +02:00
2014-06-21 20:00:28 +02:00
lBProfiles . SendToBack ( ) ;
toolStrip1 . SendToBack ( ) ;
tSOptions . SendToBack ( ) ;
2015-11-30 22:15:17 +01:00
opt . BringToFront ( ) ;
oldsize = Size ;
2014-06-21 20:00:28 +02:00
{
2015-11-30 22:15:17 +01:00
if ( Size . Height < ( int ) ( 90 * dpiy ) + Options . mSize . Height )
2017-05-13 07:54:29 +02:00
Size = new Size ( Size . Width , ( int ) ( 90 * dpiy ) + Options . mSize . Height ) ;
2015-11-30 22:15:17 +01:00
if ( Size . Width < ( int ) ( 20 * dpix ) + Options . mSize . Width )
2017-05-13 07:54:29 +02:00
Size = new Size ( ( int ) ( 20 * dpix ) + Options . mSize . Width , Size . Height ) ;
2014-06-21 20:00:28 +02:00
}
2017-05-11 17:13:51 +02:00
2015-11-30 22:15:17 +01:00
opt . Reload ( devID , profile ) ;
2017-05-11 17:13:51 +02:00
opt . inputtimer . Start ( ) ;
2015-11-30 22:15:17 +01:00
opt . Visible = true ;
2014-04-29 03:14:01 +02:00
}
2014-06-06 22:38:52 +02:00
2015-11-30 22:15:17 +01:00
public void OptionsClosed ( )
{
RefreshProfiles ( ) ;
Size = oldsize ;
oldsize = new Size ( 0 , 0 ) ;
tSBKeepSize . Text = Properties . Resources . KeepThisSize ;
tSBKeepSize . Image = Properties . Resources . size ;
tSBKeepSize . Enabled = true ;
tSOptions . Visible = false ;
toolStrip1 . Visible = true ;
toolStrip1 . Enabled = true ;
lbLastMessage . ForeColor = SystemColors . GrayText ;
2017-04-26 10:00:05 +02:00
int lvDebugItemCount = lvDebug . Items . Count ;
if ( lvDebugItemCount > 0 )
{
lbLastMessage . Text = lvDebug . Items [ lvDebugItemCount - 1 ] . SubItems [ 1 ] . Text ;
}
2017-05-08 16:29:38 +02:00
if ( ! lbNoControllers . Visible )
tabMain . SelectedIndex = 0 ;
2017-05-11 17:13:51 +02:00
opt . inputtimer . Stop ( ) ;
opt . sixaxisTimer . Stop ( ) ;
2015-11-30 22:15:17 +01:00
}
2017-04-26 10:00:05 +02:00
2014-05-12 07:48:50 +02:00
private void editButtons_Click ( object sender , EventArgs e )
{
Button bn = ( Button ) sender ;
2017-05-13 07:54:29 +02:00
//int i = Int32.Parse(bn.Tag.ToString());
int i = Convert . ToInt32 ( bn . Tag ) ;
string profileText = cbs [ i ] . Text ;
if ( profileText ! = "(" + Properties . Resources . NoProfileLoaded + ")" )
ShowOptions ( i , profileText ) ;
2015-02-08 22:51:52 +01:00
else
2017-05-13 07:54:29 +02:00
ShowOptions ( i , "" ) ;
2014-05-12 07:48:50 +02:00
}
2014-06-06 22:38:52 +02:00
2014-04-29 03:14:01 +02:00
private void editMenu_Click ( object sender , EventArgs e )
{
2014-12-13 21:12:03 +01:00
mAllowVisible = true ;
this . Show ( ) ;
WindowState = FormWindowState . Normal ;
2014-04-29 03:14:01 +02:00
ToolStripMenuItem em = ( ToolStripMenuItem ) sender ;
int i = Int32 . Parse ( em . Tag . ToString ( ) ) ;
2015-02-08 22:51:52 +01:00
if ( em . Text = = Properties . Resources . ContextNew . Replace ( "*number*" , ( i + 1 ) . ToString ( ) ) )
ShowOptions ( i , "" ) ;
else
2017-04-28 20:57:33 +02:00
{
2017-05-13 07:54:29 +02:00
for ( int t = 0 , itemCount = em . DropDownItems . Count - 2 ; t < itemCount ; t + + )
2017-04-28 20:57:33 +02:00
{
2015-02-08 22:51:52 +01:00
if ( ( ( ToolStripMenuItem ) em . DropDownItems [ t ] ) . Checked )
ShowOptions ( i , ( ( ToolStripMenuItem ) em . DropDownItems [ t ] ) . Text ) ;
2017-04-28 20:57:33 +02:00
}
}
2014-04-29 03:14:01 +02:00
}
2015-02-08 22:51:52 +01:00
2014-03-28 02:50:40 +01:00
private void lnkControllers_LinkClicked ( object sender , LinkLabelLinkClickedEventArgs e )
{
2017-05-13 07:54:29 +02:00
Process . Start ( "control" , "joy.cpl" ) ;
2014-03-28 02:50:40 +01:00
}
private void hideDS4CheckBox_CheckedChanged ( object sender , EventArgs e )
{
// Prevent the Game Controllers window from throwing an error when controllers are un/hidden
2017-05-13 07:54:29 +02:00
Process [ ] rundll64 = Process . GetProcessesByName ( "rundll64" ) ;
foreach ( Process rundll64Instance in rundll64 )
2017-04-28 20:57:33 +02:00
{
2017-05-13 07:54:29 +02:00
foreach ( ProcessModule module in rundll64Instance . Modules )
2017-04-28 20:57:33 +02:00
{
2014-03-28 02:50:40 +01:00
if ( module . FileName . Contains ( "joy.cpl" ) )
module . Dispose ( ) ;
2017-04-28 20:57:33 +02:00
}
}
2014-03-28 02:50:40 +01:00
2017-04-28 20:57:33 +02:00
bool exclusiveMode = hideDS4CheckBox . Checked ;
UseExclusiveMode = exclusiveMode ;
2015-11-28 06:47:26 +01:00
if ( Environment . OSVersion . Version . Major > = 10 & & Environment . OSVersion . Version . Build < 10586 )
2017-04-28 20:57:33 +02:00
btnConnectDS4Win10 . Visible = exclusiveMode ;
2014-07-26 01:17:45 +02:00
btnStartStop_Clicked ( false ) ;
btnStartStop_Clicked ( false ) ;
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
Save ( ) ;
2014-03-28 02:50:40 +01:00
}
2014-06-06 22:38:52 +02:00
2014-03-28 02:50:40 +01:00
private void startMinimizedCheckBox_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
StartMinimized = startMinimizedCheckBox . Checked ;
Save ( ) ;
2014-03-28 02:50:40 +01:00
}
private void lvDebug_ItemActivate ( object sender , EventArgs e )
{
2014-04-30 02:58:18 +02:00
MessageBox . Show ( ( ( ListView ) sender ) . FocusedItem . SubItems [ 1 ] . Text , "Log" ) ;
2014-03-28 02:50:40 +01:00
}
2014-04-27 21:32:09 +02:00
2014-06-02 05:19:04 +02:00
private void Profile_Changed ( object sender , EventArgs e ) //cbs[i] changed
2014-04-27 21:32:09 +02:00
{
2014-04-29 03:14:01 +02:00
ComboBox cb = ( ComboBox ) sender ;
2014-04-27 21:32:09 +02:00
int tdevice = Int32 . Parse ( cb . Tag . ToString ( ) ) ;
2015-02-13 21:19:59 +01:00
if ( cb . Items [ cb . Items . Count - 1 ] . ToString ( ) = = "+" + Properties . Resources . PlusNewProfile )
2014-04-27 21:32:09 +02:00
{
if ( cb . SelectedIndex < cb . Items . Count - 1 )
{
2014-04-29 03:14:01 +02:00
for ( int i = 0 ; i < shortcuts [ tdevice ] . DropDownItems . Count ; i + + )
2014-04-29 10:01:13 +02:00
if ( ! ( shortcuts [ tdevice ] . DropDownItems [ i ] is ToolStripSeparator ) )
2014-04-30 02:58:18 +02:00
( ( ToolStripMenuItem ) shortcuts [ tdevice ] . DropDownItems [ i ] ) . Checked = false ;
2014-04-29 03:14:01 +02:00
( ( ToolStripMenuItem ) shortcuts [ tdevice ] . DropDownItems [ cb . SelectedIndex ] ) . Checked = true ;
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
LogDebug ( DateTime . Now , Properties . Resources . UsingProfile . Replace ( "*number*" , ( tdevice + 1 ) . ToString ( ) ) . Replace ( "*Profile name*" , cb . Text ) , false ) ;
2014-08-17 00:09:15 +02:00
shortcuts [ tdevice ] . Text = Properties . Resources . ContextEdit . Replace ( "*number*" , ( tdevice + 1 ) . ToString ( ) ) ;
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
ProfilePath [ tdevice ] = cb . Items [ cb . SelectedIndex ] . ToString ( ) ;
Save ( ) ;
LoadProfile ( tdevice , true , Program . rootHub ) ;
2015-11-28 06:47:26 +01:00
if ( UseCustomLed [ tdevice ] )
lights [ tdevice ] . BackColor = CustomColor [ tdevice ] . ToColorA ;
else
lights [ tdevice ] . BackColor = MainColor [ tdevice ] . ToColorA ;
2014-04-27 21:32:09 +02:00
}
else if ( cb . SelectedIndex = = cb . Items . Count - 1 & & cb . Items . Count > 1 ) //if +New Profile selected
2014-05-12 07:48:50 +02:00
ShowOptions ( tdevice , "" ) ;
2014-08-17 00:09:15 +02:00
if ( cb . Text = = "(" + Properties . Resources . NoProfileLoaded + ")" )
ebns [ tdevice ] . Text = Properties . Resources . New ;
2014-04-29 03:14:01 +02:00
else
2014-08-17 00:09:15 +02:00
ebns [ tdevice ] . Text = Properties . Resources . EditProfile ;
2014-04-27 21:32:09 +02:00
}
2017-04-28 20:57:33 +02:00
2017-04-29 10:19:45 +02:00
OnDeviceStatusChanged ( this , tdevice ) ; //to update profile name in notify icon
2014-04-29 03:14:01 +02:00
}
private void Profile_Changed_Menu ( object sender , ToolStripItemClickedEventArgs e )
{
ToolStripMenuItem tS = ( ToolStripMenuItem ) sender ;
int tdevice = Int32 . Parse ( tS . Tag . ToString ( ) ) ;
2014-04-29 10:01:13 +02:00
if ( ! ( e . ClickedItem is ToolStripSeparator ) )
2017-04-28 20:57:33 +02:00
{
2014-05-12 07:48:50 +02:00
if ( e . ClickedItem ! = tS . DropDownItems [ tS . DropDownItems . Count - 1 ] ) //if +New Profile not selected
2014-06-02 05:19:04 +02:00
cbs [ tdevice ] . SelectedIndex = tS . DropDownItems . IndexOf ( e . ClickedItem ) ;
2014-05-12 07:48:50 +02:00
else //if +New Profile selected
ShowOptions ( tdevice , "" ) ;
2017-04-28 20:57:33 +02:00
}
2014-04-29 03:14:01 +02:00
}
private void exitToolStripMenuItem_Click ( object sender , EventArgs e )
{
2014-12-13 21:12:03 +01:00
contextclose = true ;
2014-04-29 03:14:01 +02:00
this . Close ( ) ;
}
private void openToolStripMenuItem_Click ( object sender , EventArgs e )
{
2014-11-20 20:03:18 +01:00
mAllowVisible = true ;
2014-04-29 03:14:01 +02:00
this . Show ( ) ;
2015-02-08 22:51:52 +01:00
Focus ( ) ;
2014-04-29 03:14:01 +02:00
WindowState = FormWindowState . Normal ;
2014-09-02 01:23:02 +02:00
}
2015-02-08 22:51:52 +01:00
2014-09-02 01:23:02 +02:00
private void startToolStripMenuItem_Click ( object sender , EventArgs e )
{
btnStartStop_Clicked ( ) ;
}
2017-04-28 20:57:33 +02:00
2014-05-30 22:39:39 +02:00
private void notifyIcon1_MouseClick ( object sender , MouseEventArgs e )
2014-05-16 00:10:17 +02:00
{
2017-05-13 07:54:29 +02:00
if ( e . Button = = MouseButtons . Middle )
2014-12-13 21:12:03 +01:00
{
contextclose = true ;
2014-05-30 22:39:39 +02:00
this . Close ( ) ;
2014-12-13 21:12:03 +01:00
}
2014-05-30 22:39:39 +02:00
}
2017-04-28 20:57:33 +02:00
2014-05-30 22:39:39 +02:00
private void notifyIcon1_BalloonTipClicked ( object sender , EventArgs e )
{
this . Show ( ) ;
WindowState = FormWindowState . Normal ;
2014-05-16 00:10:17 +02:00
}
private void llbHelp_LinkClicked ( object sender , LinkLabelLinkClickedEventArgs 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
Hotkeys hotkeysForm = new Hotkeys ( ) ;
2014-05-16 00:10:17 +02:00
hotkeysForm . Icon = this . Icon ;
2015-02-08 22:51:52 +01:00
hotkeysForm . Text = llbHelp . Text ;
2014-05-16 00:10:17 +02:00
hotkeysForm . ShowDialog ( ) ;
}
2014-05-21 19:39:56 +02:00
private void StartWindowsCheckBox_CheckedChanged ( object sender , EventArgs e )
{
2017-04-20 07:54:09 +02:00
bool isChecked = StartWindowsCheckBox . Checked ;
2014-05-21 19:39:56 +02:00
RegistryKey KeyLoc = Registry . CurrentUser . OpenSubKey ( "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run" , true ) ;
2017-04-20 07:54:09 +02:00
if ( isChecked & & ! File . Exists ( Environment . GetFolderPath ( Environment . SpecialFolder . Startup ) + "\\DS4Windows.lnk" ) )
{
2014-06-13 21:52:25 +02:00
appShortcutToStartup ( ) ;
2017-04-20 07:54:09 +02:00
}
else if ( ! isChecked )
{
2014-06-13 21:52:25 +02:00
File . Delete ( Environment . GetFolderPath ( Environment . SpecialFolder . Startup ) + "\\DS4Windows.lnk" ) ;
2017-04-20 07:54:09 +02:00
}
2014-06-13 21:52:25 +02:00
KeyLoc . DeleteValue ( "DS4Tool" , false ) ;
2017-04-20 07:54:09 +02:00
if ( isChecked )
{
runStartupPanel . Visible = true ;
}
else
{
runStartupPanel . Visible = false ;
runStartTaskRadio . Checked = false ;
runStartProgRadio . Checked = true ;
}
changeStartupRoutine ( ) ;
2014-06-13 21:52:25 +02:00
}
private void appShortcutToStartup ( )
{
2017-05-13 07:54:29 +02:00
Type t = Type . GetTypeFromCLSID ( new Guid ( "72C24DD5-D70A-438B-8A42-98424B88AFB8" ) ) ; // Windows Script Host Shell Object
2014-06-13 21:52:25 +02:00
dynamic shell = Activator . CreateInstance ( t ) ;
try
{
var lnk = shell . CreateShortcut ( Environment . GetFolderPath ( Environment . SpecialFolder . Startup ) + "\\DS4Windows.lnk" ) ;
try
{
string app = Assembly . GetExecutingAssembly ( ) . Location ;
2017-04-23 11:22:31 +02:00
lnk . TargetPath = Assembly . GetExecutingAssembly ( ) . Location ;
2017-04-20 07:54:09 +02:00
if ( runStartProgRadio . Checked )
{
lnk . Arguments = "-m" ;
}
else if ( runStartTaskRadio . Checked )
{
lnk . Arguments = "-runtask" ;
}
//lnk.TargetPath = Assembly.GetExecutingAssembly().Location;
//lnk.Arguments = "-m";
2014-06-13 21:52:25 +02:00
lnk . IconLocation = app . Replace ( '\\' , '/' ) ;
lnk . Save ( ) ;
}
finally
{
Marshal . FinalReleaseComObject ( lnk ) ;
}
}
finally
{
Marshal . FinalReleaseComObject ( shell ) ;
}
2014-05-21 19:39:56 +02:00
}
2014-05-31 06:37:02 +02:00
private void tabMain_SelectedIndexChanged ( object sender , EventArgs e )
2014-05-30 22:39:39 +02:00
{
2017-05-13 07:54:29 +02:00
TabPage currentTab = tabMain . SelectedTab ;
lbLastMessage . Visible = currentTab ! = tabLog ;
if ( currentTab = = tabLog )
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
chData . AutoResize ( ColumnHeaderAutoResizeStyle . HeaderSize ) ;
2017-05-13 07:54:29 +02:00
if ( currentTab = = tabSettings )
2014-12-03 23:36:54 +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
lbLastMessage . ForeColor = SystemColors . GrayText ;
lbLastMessage . Text = Properties . Resources . HoverOverItems ;
2014-12-03 23:36:54 +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 ( lvDebug . Items . Count > 0 )
2017-05-13 07:54:29 +02:00
lbLastMessage . Text = lvDebug . Items [ lvDebug . Items . Count - 1 ] . SubItems [ 1 ] . Text ;
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
lbLastMessage . Text = "" ;
2015-12-05 09:55:11 +01:00
2017-05-11 17:13:51 +02:00
/ * if ( tabMain . SelectedIndex ! = 1 | | ! opt . Visible )
2015-12-05 09:55:11 +01:00
opt . inputtimer . Stop ( ) ;
else if ( opt . Visible & & tabMain . SelectedIndex = = 1 )
opt . inputtimer . Start ( ) ;
2017-05-11 17:13:51 +02:00
* /
2014-05-30 22:39:39 +02:00
}
2014-12-03 23:36:54 +01:00
private void Items_MouseHover ( object sender , EventArgs e )
{
2017-05-05 05:15:22 +02:00
string hoverText = Properties . Resources . HoverOverItems ;
string temp = "" ;
if ( hoverTextDict . TryGetValue ( ( Control ) sender , out temp ) )
2014-12-03 23:36:54 +01:00
{
2017-05-05 05:15:22 +02:00
hoverText = temp ;
}
2014-12-03 23:36:54 +01:00
2017-05-05 05:15:22 +02:00
lbLastMessage . Text = hoverText ;
/ * switch ( ( ( System . Windows . Forms . Control ) sender ) . Name )
{
2014-12-03 23:36:54 +01:00
//if (File.Exists(appdatapath + "\\Auto Profiles.xml"))
case "linkUninstall" : lbLastMessage . Text = Properties . Resources . IfRemovingDS4Windows ; break ;
case "cBSwipeProfiles" : lbLastMessage . Text = Properties . Resources . TwoFingerSwipe ; break ;
case "cBQuickCharge" : lbLastMessage . Text = Properties . Resources . QuickCharge ; break ;
case "pnlXIPorts" : lbLastMessage . Text = Properties . Resources . XinputPorts ; break ;
2014-12-13 21:12:03 +01:00
case "lbUseXIPorts" : lbLastMessage . Text = Properties . Resources . XinputPorts ; break ;
case "nUDXIPorts" : lbLastMessage . Text = Properties . Resources . XinputPorts ; break ;
case "lbLastXIPort" : lbLastMessage . Text = Properties . Resources . XinputPorts ; break ;
case "cBCloseMini" : lbLastMessage . Text = Properties . Resources . CloseMinimize ; 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
default : lbLastMessage . Text = Properties . Resources . HoverOverItems ; break ;
2014-12-03 23:36:54 +01:00
}
2017-05-05 05:15:22 +02:00
* /
2017-04-28 20:57:33 +02:00
2017-05-05 05:15:22 +02:00
//if (lbLastMessage.Text != Properties.Resources.HoverOverItems)
if ( hoverText ! = Properties . Resources . HoverOverItems )
2014-12-03 23:36:54 +01:00
lbLastMessage . ForeColor = Color . Black ;
else
lbLastMessage . ForeColor = SystemColors . GrayText ;
}
2014-05-31 19:27:43 +02:00
private void lBProfiles_MouseDown ( object sender , MouseEventArgs e )
{
lBProfiles . SelectedIndex = lBProfiles . IndexFromPoint ( e . X , e . Y ) ;
2017-05-13 07:54:29 +02:00
if ( e . Button = = MouseButtons . Right )
2014-05-31 19:27:43 +02:00
{
if ( lBProfiles . SelectedIndex < 0 )
{
2014-06-02 05:19:04 +02:00
cMProfile . ShowImageMargin = false ;
2014-05-31 19:27:43 +02:00
assignToController1ToolStripMenuItem . Visible = false ;
assignToController2ToolStripMenuItem . Visible = false ;
assignToController3ToolStripMenuItem . Visible = false ;
assignToController4ToolStripMenuItem . Visible = false ;
deleteToolStripMenuItem . Visible = false ;
editToolStripMenuItem . Visible = false ;
duplicateToolStripMenuItem . Visible = false ;
exportToolStripMenuItem . Visible = false ;
}
else
{
2014-06-02 05:19:04 +02:00
cMProfile . ShowImageMargin = true ;
2014-05-31 19:27:43 +02:00
assignToController1ToolStripMenuItem . Visible = true ;
assignToController2ToolStripMenuItem . Visible = true ;
assignToController3ToolStripMenuItem . Visible = true ;
assignToController4ToolStripMenuItem . Visible = true ;
2014-06-02 05:19:04 +02:00
ToolStripMenuItem [ ] assigns = { assignToController1ToolStripMenuItem ,
assignToController2ToolStripMenuItem ,
assignToController3ToolStripMenuItem ,
assignToController4ToolStripMenuItem } ;
2017-05-13 07:54:29 +02:00
2014-06-02 05:19:04 +02:00
for ( int i = 0 ; i < 4 ; i + + )
{
if ( lBProfiles . SelectedIndex = = cbs [ i ] . SelectedIndex )
assigns [ i ] . Checked = true ;
else
assigns [ i ] . Checked = false ;
}
2017-05-13 07:54:29 +02:00
2014-05-31 19:27:43 +02:00
deleteToolStripMenuItem . Visible = true ;
editToolStripMenuItem . Visible = true ;
duplicateToolStripMenuItem . Visible = true ;
2015-02-08 22:51:52 +01:00
exportToolStripMenuItem . Visible = true ;
2014-05-31 19:27:43 +02:00
}
}
}
2014-06-02 05:19:04 +02:00
private void ScpForm_DragDrop ( object sender , DragEventArgs e )
{
bool therewasanxml = false ;
string [ ] files = ( string [ ] ) e . Data . GetData ( DataFormats . FileDrop , false ) ;
for ( int i = 0 ; i < files . Length ; i + + )
2017-05-05 05:15:22 +02:00
{
2014-06-02 05:19:04 +02:00
if ( files [ i ] . EndsWith ( ".xml" ) )
{
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
File . Copy ( files [ i ] , appdatapath + "\\Profiles\\" + Path . GetFileName ( files [ i ] ) , true ) ;
2014-06-02 05:19:04 +02:00
therewasanxml = true ;
}
2017-05-05 05:15:22 +02:00
}
2014-06-02 05:19:04 +02:00
if ( therewasanxml )
RefreshProfiles ( ) ;
}
private void ScpForm_DragEnter ( object sender , DragEventArgs e )
{
if ( e . Data . GetDataPresent ( DataFormats . FileDrop ) )
e . Effect = DragDropEffects . Copy ; // Okay
else
e . Effect = DragDropEffects . None ; // Unknown data, ignore it
}
2014-06-02 19:29:38 +02:00
private void tBProfile_TextChanged ( object sender , EventArgs e )
{
2017-05-13 07:54:29 +02:00
if ( tSTBProfile . Text ! = null & & tSTBProfile . Text ! = "" & &
! tSTBProfile . Text . Contains ( "\\" ) & & ! tSTBProfile . Text . Contains ( "/" ) & &
! tSTBProfile . Text . Contains ( ":" ) & & ! tSTBProfile . Text . Contains ( "*" ) & &
! tSTBProfile . Text . Contains ( "?" ) & & ! tSTBProfile . Text . Contains ( "\"" ) & &
! tSTBProfile . Text . Contains ( "<" ) & & ! tSTBProfile . Text . Contains ( ">" ) & &
! tSTBProfile . Text . Contains ( "|" ) )
tSTBProfile . ForeColor = SystemColors . WindowText ;
2014-06-02 19:29:38 +02:00
else
2017-05-13 07:54:29 +02:00
tSTBProfile . ForeColor = SystemColors . GrayText ;
2014-06-02 19:29:38 +02:00
}
private void tBProfile_Enter ( object sender , EventArgs e )
{
2014-08-17 00:09:15 +02:00
if ( tSTBProfile . Text = = "<" + Properties . Resources . TypeProfileName + ">" )
2014-06-02 19:29:38 +02:00
tSTBProfile . Text = "" ;
}
private void tBProfile_Leave ( object sender , EventArgs e )
{
if ( tSTBProfile . Text = = "" )
2014-08-17 00:09:15 +02:00
tSTBProfile . Text = "<" + Properties . Resources . TypeProfileName + ">" ;
2014-06-02 19:29:38 +02:00
}
private void tSBCancel_Click ( object sender , EventArgs e )
{
2015-11-30 22:15:17 +01:00
if ( opt . Visible )
2014-06-02 19:29:38 +02:00
opt . Close ( ) ;
}
2014-06-13 21:52:25 +02:00
private void tSBSaveProfile_Click ( object sender , EventArgs e )
2014-06-02 19:29:38 +02:00
{
2015-11-30 22:15:17 +01:00
if ( opt . Visible )
2014-06-02 19:29:38 +02:00
{
2014-12-13 21:12:03 +01:00
opt . saving = true ;
2014-06-02 19:29:38 +02:00
opt . Set ( ) ;
2017-05-13 07:54:29 +02:00
if ( tSTBProfile . Text ! = null & & tSTBProfile . Text ! = "" & &
! tSTBProfile . Text . Contains ( "\\" ) & & ! tSTBProfile . Text . Contains ( "/" ) & &
! tSTBProfile . Text . Contains ( ":" ) & & ! tSTBProfile . Text . Contains ( "*" ) & &
! tSTBProfile . Text . Contains ( "?" ) & & ! tSTBProfile . Text . Contains ( "\"" ) & &
! tSTBProfile . Text . Contains ( "<" ) & & ! tSTBProfile . Text . Contains ( ">" ) & &
! tSTBProfile . Text . Contains ( "|" ) )
2014-06-02 19:29:38 +02:00
{
2017-05-08 16:29:38 +02:00
File . Delete ( appdatapath + @"\Profiles\" + opt . filename + ".xml" ) ;
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
ProfilePath [ opt . device ] = tSTBProfile . Text ;
2015-12-18 07:25:51 +01:00
SaveProfile ( opt . device , tSTBProfile . Text ) ;
2017-05-08 16:29:38 +02:00
cacheProfileCustomsFlags ( opt . device ) ;
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
Save ( ) ;
2014-06-02 19:29:38 +02:00
opt . Close ( ) ;
}
else
2014-08-17 00:09:15 +02:00
MessageBox . Show ( Properties . Resources . ValidName , Properties . Resources . NotValid , MessageBoxButtons . OK , MessageBoxIcon . Exclamation ) ;
2014-06-02 19:29:38 +02:00
}
}
2014-06-06 22:38:52 +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 tSBKeepSize_Click ( object sender , EventArgs e )
{
oldsize = Size ;
2014-08-17 00:09:15 +02:00
tSBKeepSize . Text = Properties . Resources . WillKeep ;
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
tSBKeepSize . Image = Properties . Resources . _checked ;
tSBKeepSize . Enabled = false ;
}
2014-06-06 22:38:52 +02:00
private void cBUpdate_CheckedChanged ( object sender , EventArgs e )
{
if ( ! cBUpdate . Checked )
{
nUDUpdateTime . Value = 0 ;
pNUpdate . Enabled = false ;
}
else
{
nUDUpdateTime . Value = 1 ;
cBUpdateTime . SelectedIndex = 0 ;
pNUpdate . Enabled = true ;
}
}
private void nUDUpdateTime_ValueChanged ( object sender , EventArgs e )
{
2017-05-13 07:54:29 +02:00
int currentIndex = cBUpdateTime . SelectedIndex ;
if ( currentIndex = = 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
CheckWhen = ( int ) nUDUpdateTime . Value ;
2017-05-13 07:54:29 +02:00
else if ( currentIndex = = 1 )
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
CheckWhen = ( int ) nUDUpdateTime . Value * 24 ;
2017-05-13 07:54:29 +02:00
2014-06-06 22:38:52 +02:00
if ( nUDUpdateTime . Value < 1 )
cBUpdate . Checked = false ;
2017-05-13 07:54:29 +02:00
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
if ( nUDUpdateTime . Value = = 1 )
{
2017-05-13 07:54:29 +02:00
int index = currentIndex ;
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
cBUpdateTime . Items . Clear ( ) ;
2014-08-17 00:09:15 +02:00
cBUpdateTime . Items . Add ( Properties . Resources . Hour ) ;
cBUpdateTime . Items . Add ( Properties . Resources . Day ) ;
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
cBUpdateTime . SelectedIndex = index ;
}
2014-08-17 00:09:15 +02:00
else if ( cBUpdateTime . Items [ 0 ] . ToString ( ) = = Properties . Resources . Hour )
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
{
2017-05-13 07:54:29 +02:00
int index = currentIndex ;
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
cBUpdateTime . Items . Clear ( ) ;
2014-08-17 00:09:15 +02:00
cBUpdateTime . Items . Add ( Properties . Resources . Hours ) ;
cBUpdateTime . Items . Add ( Properties . Resources . Days ) ;
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
cBUpdateTime . SelectedIndex = index ;
}
2014-06-06 22:38:52 +02:00
}
private void cBUpdateTime_SelectedIndexChanged ( object sender , EventArgs e )
{
2017-05-13 07:54:29 +02:00
int index = cBUpdateTime . SelectedIndex ;
if ( index = = 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
CheckWhen = ( int ) nUDUpdateTime . Value ;
2017-05-13 07:54:29 +02:00
else if ( index = = 1 )
Version 1.4.266
Flash Lightbar when at high latency now has the option to choose what
you decide is high latency
Show Notifications now has the option to only show warnings, such as
when a controller cannot be grabbed exclusively
Speaking of bad news for Windows 10 users: Hide DS4 has now been
disabled, until i can figure out why this is, it will be disabled, this
means some games that rely on this may not work properly or at all,
sorry about that
As for good news for Windows 10, did you know you can press Windows + G
to open a game bar which can record games. For Windows 10 users, there's
a new special action: Xbox Game DVR. Pick a trigger (only one button)
and tapping/holding/or double tapping does various things, such as
start/stop recording, save an ongoing recording, take a screenshot (via
the xbox app's option or your own hotkey ie form steam), or just open
the gamebar
Much of the code has been updated with c# 6.0
Added manifest so DS4Windows can notice Windows 10 and high DPIs, also
reorganized files
2015-07-31 05:34:22 +02:00
CheckWhen = ( int ) nUDUpdateTime . Value * 24 ;
2014-06-06 22:38:52 +02:00
}
private void lLBUpdate_LinkClicked ( object sender , LinkLabelLinkClickedEventArgs e )
{
2017-05-13 07:54:29 +02:00
// Sorry other devs, gonna have to find your own server
Uri url = new Uri ( "http://23.236.26.40/ds4windows/files/builds/newest.txt" ) ;
2014-06-06 22:38:52 +02:00
WebClient wct = new WebClient ( ) ;
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
wct . DownloadFileAsync ( url , appdatapath + "\\version.txt" ) ;
2014-06-06 22:38:52 +02:00
wct . DownloadFileCompleted + = wct_DownloadFileCompleted ;
}
2014-06-21 20:00:28 +02:00
private void cBDisconnectBT_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
DCBTatStop = cBDisconnectBT . Checked ;
2014-06-21 20:00:28 +02:00
}
2014-06-06 22:38:52 +02:00
void wct_DownloadFileCompleted ( object sender , System . ComponentModel . AsyncCompletedEventArgs 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
LastChecked = DateTime . Now ;
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
FileVersionInfo fvi = FileVersionInfo . GetVersionInfo ( Assembly . GetExecutingAssembly ( ) . Location ) ;
string version2 = fvi . FileVersion ;
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
string newversion2 = File . ReadAllText ( appdatapath + "\\version.txt" ) ;
if ( version2 . Replace ( ',' , '.' ) . CompareTo ( File . ReadAllText ( appdatapath + "\\version.txt" ) ) = = - 1 ) //CompareVersions();
2017-05-13 07:54:29 +02:00
{
if ( MessageBox . Show ( Properties . Resources . DownloadVersion . Replace ( "*number*" , newversion2 ) ,
Properties . Resources . DS4Update , MessageBoxButtons . YesNo , MessageBoxIcon . Question ) = = DialogResult . Yes )
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
{
if ( ! File . Exists ( exepath + "\\DS4Updater.exe" ) | | ( File . Exists ( exepath + "\\DS4Updater.exe" )
& & ( FileVersionInfo . GetVersionInfo ( exepath + "\\DS4Updater.exe" ) . FileVersion . CompareTo ( "1.1.0.0" ) = = - 1 ) ) )
{
2014-10-13 23:56:04 +02:00
Uri url2 = new Uri ( "http://ds4windows.com/Files/DS4Updater.exe" ) ;
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
WebClient wc2 = new WebClient ( ) ;
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
if ( appdatapath = = exepath )
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
wc2 . DownloadFile ( url2 , exepath + "\\DS4Updater.exe" ) ;
else
2014-06-06 22:38:52 +02:00
{
2014-08-17 00:09:15 +02:00
MessageBox . Show ( Properties . Resources . PleaseDownloadUpdater ) ;
2014-10-13 23:56:04 +02:00
Process . Start ( "http://ds4windows.com/Files/DS4Updater.exe" ) ;
2014-06-06 22:38:52 +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
}
2017-05-13 07:54:29 +02:00
2014-08-18 07:18:46 +02:00
Process p = new Process ( ) ;
p . StartInfo . FileName = exepath + "\\DS4Updater.exe" ;
2015-03-15 19:16:01 +01:00
if ( ! cBDownloadLangauge . Checked )
2015-02-08 22:51:52 +01:00
p . StartInfo . Arguments = "-skipLang" ;
2017-05-13 07:54:29 +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
if ( AdminNeeded ( ) )
2014-08-18 07:18:46 +02:00
p . StartInfo . Verb = "runas" ;
2017-05-13 07:54:29 +02:00
2014-12-02 01:07:29 +01:00
try { p . Start ( ) ; Close ( ) ; }
2015-02-08 22:51:52 +01:00
catch { }
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-06 22:38:52 +02: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
File . Delete ( appdatapath + "\\version.txt" ) ;
2017-05-13 07:54:29 +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
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
File . Delete ( appdatapath + "\\version.txt" ) ;
2014-08-17 00:09:15 +02:00
MessageBox . Show ( Properties . Resources . UpToDate , "DS4Windows Updater" ) ;
2014-06-06 22:38:52 +02:00
}
}
private void linkProfiles_LinkClicked ( object sender , LinkLabelLinkClickedEventArgs e )
{
2017-05-13 07:54:29 +02:00
Process . Start ( appdatapath + "\\Profiles" ) ;
2014-06-06 22:38:52 +02:00
}
private void linkUninstall_LinkClicked ( object sender , LinkLabelLinkClickedEventArgs 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
if ( File . Exists ( appdatapath + "\\Virtual Bus Driver\\ScpDriver.exe" ) )
2017-05-13 07:54:29 +02:00
{
try { Process . Start ( appdatapath + "\\Virtual Bus Driver\\ScpDriver.exe" ) ; }
catch { Process . Start ( appdatapath + "\\Virtual Bus Driver" ) ; }
}
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
}
private void cBoxNotifications_SelectedIndexChanged ( object sender , EventArgs e )
{
Notifications = cBoxNotifications . SelectedIndex ;
2014-06-06 22:38:52 +02:00
}
2014-06-09 01:41:36 +02:00
private void lLSetup_LinkClicked ( object sender , LinkLabelLinkClickedEventArgs e )
{
2014-12-02 01:07:29 +01:00
Process p = new Process ( ) ;
p . StartInfo . FileName = Assembly . GetExecutingAssembly ( ) . Location ;
2014-12-13 21:12:03 +01:00
p . StartInfo . Arguments = "-driverinstall" ;
2014-12-02 01:07:29 +01:00
p . StartInfo . Verb = "runas" ;
try { p . Start ( ) ; }
catch { }
//WelcomeDialog wd = new WelcomeDialog();
//wd.ShowDialog();
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
tabSettings . Text = originalsettingstext ;
2014-07-08 20:21:09 +02:00
linkSetup . LinkColor = Color . Blue ;
2014-06-09 01:41:36 +02:00
}
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
2014-06-13 21:52:25 +02:00
protected void ScpForm_Closing ( object sender , FormClosingEventArgs e )
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
{
2015-11-30 22:15:17 +01:00
if ( opt . Visible )
2014-06-13 21:52:25 +02:00
{
opt . Close ( ) ;
e . Cancel = true ;
return ;
Rest of DS4Windows has been upped to .NET 4.5 (If you have .net 4/already can run DS4Windows, this won't affect you), thanks to this update, you can now...
Add delay to macros from one millisecond to 60 seconds, macros with delays only run once until pressed again. Without delays, the macro can be repeated while held down.
Profiles and settings are now back inside the application folder to help portability. It will remain in appdata as previous versions if DS4Windows is in a admin folder, I may try to add a setting for location saving.
Import profile option will automatically go to the appdata profile folder, auto profiles and settings will automatically copy over.
Option to delete the appdata folder if not in use in the settings tab, this way it helps with cleanup.
Another fix for auto profiles startup bug
Better reading of autoprofile program path names
Now only one instance of DS4Windows is possible, if another DS4Tool or DS4Windows that is not this version is started, this DS4Windows comes back into focus.
UI fixes
2014-06-10 21:45:09 +02:00
}
2017-05-01 11:29:19 +02:00
2014-12-13 21:12:03 +01:00
if ( cBCloseMini . Checked & & ! contextclose )
{
this . WindowState = FormWindowState . Minimized ;
e . Cancel = true ;
return ;
}
2017-05-01 11:29:19 +02:00
2014-06-12 20:46:00 +02:00
if ( systemShutdown )
// Reset the variable because the user might cancel the
// shutdown.
{
systemShutdown = false ;
DS4LightBar . shuttingdown = true ;
}
2017-05-01 11:29:19 +02:00
2017-05-13 07:54:29 +02:00
if ( oldsize = = new Size ( 0 , 0 ) )
2014-06-12 20:46:00 +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
FormWidth = this . Width ;
FormHeight = this . Height ;
2014-06-12 20:46:00 +02: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
FormWidth = oldsize . Width ;
FormHeight = oldsize . Height ;
2014-06-12 20:46:00 +02:00
}
2017-05-01 11:29:19 +02:00
2017-05-13 07:54:29 +02:00
if ( ! string . IsNullOrEmpty ( appdatapath ) )
2014-06-12 20:46:00 +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
Save ( ) ;
2017-05-01 11:29:19 +02:00
blankControllerTab ( ) ;
2014-12-13 21:12:03 +01:00
Program . rootHub . Stop ( ) ;
2014-06-12 20:46:00 +02:00
}
}
2014-06-21 20:00:28 +02:00
private void cBSwipeProfiles_CheckedChanged ( object sender , EventArgs e )
{
2017-05-09 16:24:46 +02:00
bool swipe = false ;
SwipeProfiles = swipe = cBSwipeProfiles . Checked ;
bool timerEnabled = hotkeysTimer . Enabled ;
if ( swipe & & ! timerEnabled )
{
hotkeysTimer . Start ( ) ;
}
else if ( ! swipe & & timerEnabled )
{
hotkeysTimer . Stop ( ) ;
}
2014-06-21 20:00:28 +02:00
}
2014-10-21 04:31:13 +02:00
2014-11-20 20:03:18 +01:00
private void cBQuickCharge_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
QuickCharge = cBQuickCharge . Checked ;
2014-11-20 20:03:18 +01:00
}
2014-10-21 04:31:13 +02:00
private void lbLastMessage_MouseHover ( object sender , EventArgs e )
{
2015-02-08 22:51:52 +01:00
toolTip1 . Show ( lbLastMessage . Text , lbLastMessage , - 3 , - 3 ) ;
2014-10-21 04:31:13 +02:00
}
private void pnlButton_MouseLeave ( object sender , EventArgs e )
{
2015-02-08 22:51:52 +01:00
toolTip1 . Hide ( lbLastMessage ) ;
2014-10-21 04:31:13 +02:00
}
2014-12-03 23:36:54 +01:00
private void pnlXIPorts_MouseEnter ( object sender , EventArgs e )
{
//oldxiport = (int)Math.Round(nUDXIPorts.Value,0);
}
2017-05-13 07:54:29 +02:00
2014-12-03 23:36:54 +01:00
int oldxiport ;
private void pnlXIPorts_MouseLeave ( object sender , EventArgs e )
{
2015-02-08 22:51:52 +01:00
2014-12-03 23:36:54 +01:00
}
private void nUDXIPorts_ValueChanged ( object sender , EventArgs e )
{
lbLastXIPort . Text = "- " + ( ( int ) Math . Round ( nUDXIPorts . Value , 0 ) + 3 ) ;
}
private void nUDXIPorts_Leave ( object sender , EventArgs e )
{
2015-02-08 22:51:52 +01:00
if ( oldxiport ! = ( int ) Math . Round ( nUDXIPorts . Value , 0 ) )
{
oldxiport = ( int ) Math . Round ( nUDXIPorts . Value , 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
FirstXinputPort = oldxiport ;
2015-02-08 22:51:52 +01:00
Program . rootHub . x360Bus . FirstController = oldxiport ;
btnStartStop_Click ( sender , e ) ;
btnStartStop_Click ( sender , e ) ;
}
2014-12-03 23:36:54 +01:00
}
private void nUDXIPorts_Enter ( object sender , EventArgs e )
{
oldxiport = ( int ) Math . Round ( nUDXIPorts . Value , 0 ) ;
}
2014-12-13 21:12:03 +01:00
private void cBCloseMini_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
CloseMini = cBCloseMini . Checked ;
2015-02-08 22:51:52 +01:00
}
private void Pads_MouseHover ( object sender , EventArgs e )
{
Label lb = ( Label ) sender ;
int i = Int32 . Parse ( lb . Tag . ToString ( ) ) ;
2017-05-13 07:54:29 +02:00
DS4Device d = Program . rootHub . DS4Controllers [ i ] ;
if ( d ! = null & & d . ConnectionType = = ConnectionType . BT )
2015-02-08 22:51:52 +01:00
{
2017-05-13 07:54:29 +02:00
double latency = d . Latency ;
2015-02-08 22:51:52 +01:00
toolTip1 . Hide ( Pads [ i ] ) ;
toolTip1 . Show ( Properties . Resources . InputDelay . Replace ( "*number*" , latency . ToString ( ) ) , lb , lb . Size . Width , 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
2015-02-08 22:51:52 +01:00
private void Pads_MouseLeave ( object sender , EventArgs e )
{
toolTip1 . Hide ( ( Label ) sender ) ;
}
2017-05-11 17:13:51 +02:00
2015-08-13 05:53:43 +02:00
Process bat ;
private void btnConnectDS4Win10_Click ( object sender , EventArgs e )
{
if ( ! runningBat )
{
StreamWriter w = new StreamWriter ( exepath + "\\ConnectDS4.bat" ) ;
w . WriteLine ( "@echo off" ) ; // Turn off echo
w . WriteLine ( "taskkill /IM explorer.exe /f" ) ;
w . WriteLine ( "echo Connect your DS4 controller" ) ; //
w . WriteLine ( "pause" ) ;
w . WriteLine ( "start explorer.exe" ) ;
w . Close ( ) ;
runningBat = true ;
bat = Process . Start ( exepath + "\\ConnectDS4.bat" ) ;
}
}
2017-05-11 17:13:51 +02:00
2015-11-28 06:47:26 +01:00
int currentCustomLed ;
private void EditCustomLed ( object sender , EventArgs e )
{
currentCustomLed = int . Parse ( ( ( Button ) sender ) . Tag . ToString ( ) ) ;
useCustomColorToolStripMenuItem . Checked = UseCustomLed [ currentCustomLed ] ;
useProfileColorToolStripMenuItem . Checked = ! UseCustomLed [ currentCustomLed ] ;
cMCustomLed . Show ( ( Button ) sender , new Point ( 0 , ( ( Button ) sender ) . Height ) ) ;
}
private void useProfileColorToolStripMenuItem_Click ( object sender , EventArgs e )
{
UseCustomLed [ currentCustomLed ] = false ;
lights [ currentCustomLed ] . BackColor = MainColor [ currentCustomLed ] . ToColorA ;
Global . Save ( ) ;
}
private void useCustomColorToolStripMenuItem_Click ( object sender , EventArgs e )
{
advColorDialog . Color = CustomColor [ currentCustomLed ] . ToColor ;
if ( advColorDialog . ShowDialog ( ) = = DialogResult . OK )
{
lights [ currentCustomLed ] . BackColor = new DS4Color ( advColorDialog . Color ) . ToColorA ;
CustomColor [ currentCustomLed ] = new DS4Color ( advColorDialog . Color ) ;
UseCustomLed [ currentCustomLed ] = true ;
Global . Save ( ) ;
}
2017-05-11 17:13:51 +02:00
2015-11-28 06:47:26 +01:00
DS4LightBar . forcedFlash [ currentCustomLed ] = 0 ;
DS4LightBar . forcelight [ currentCustomLed ] = false ;
}
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
private void cBUseWhiteIcon_CheckedChanged ( object sender , EventArgs e )
{
UseWhiteIcon = cBUseWhiteIcon . Checked ;
notifyIcon1 . Icon = UseWhiteIcon ? Properties . Resources . DS4W___White : Properties . Resources . DS4W ;
}
2015-11-28 06:47:26 +01:00
private void advColorDialog_OnUpdateColor ( object sender , EventArgs e )
{
if ( sender is Color )
{
Color color = ( Color ) sender ;
DS4Color dcolor = new DS4Color ( color ) ;
Console . WriteLine ( dcolor ) ;
DS4LightBar . forcedColor [ currentCustomLed ] = dcolor ;
DS4LightBar . forcedFlash [ currentCustomLed ] = 0 ;
DS4LightBar . forcelight [ currentCustomLed ] = true ;
}
}
2015-02-08 22:51:52 +01:00
2017-04-04 05:07:56 +02:00
private void lBProfiles_SelectedIndexChanged ( object sender , EventArgs e )
{
int index = lBProfiles . SelectedIndex ;
if ( index > = 0 )
{
tsBNewProfle . Enabled = true ;
tsBEditProfile . Enabled = true ;
tsBDeleteProfile . Enabled = true ;
tSBDupProfile . Enabled = true ;
tSBImportProfile . Enabled = true ;
tSBExportProfile . Enabled = true ;
}
else
{
tsBNewProfle . Enabled = true ;
tsBEditProfile . Enabled = false ;
tsBDeleteProfile . Enabled = false ;
tSBDupProfile . Enabled = false ;
2017-05-17 11:10:15 +02:00
tSBImportProfile . Enabled = true ;
2017-04-04 05:07:56 +02:00
tSBExportProfile . Enabled = false ;
}
}
2017-04-20 07:54:09 +02:00
private void runStartProgRadio_Click ( object sender , EventArgs e )
{
appShortcutToStartup ( ) ;
changeStartupRoutine ( ) ;
}
private void runStartTaskRadio_Click ( object sender , EventArgs e )
{
appShortcutToStartup ( ) ;
changeStartupRoutine ( ) ;
}
private void changeStartupRoutine ( )
{
if ( runStartTaskRadio . Checked )
{
WindowsIdentity identity = WindowsIdentity . GetCurrent ( ) ;
WindowsPrincipal principal = new WindowsPrincipal ( identity ) ;
if ( principal . IsInRole ( WindowsBuiltInRole . Administrator ) )
{
TaskService ts = new TaskService ( ) ;
Microsoft . Win32 . TaskScheduler . Task tasker = ts . FindTask ( "RunDS4Windows" ) ;
if ( tasker ! = null )
{
ts . RootFolder . DeleteTask ( "RunDS4Windows" ) ;
}
TaskDefinition td = ts . NewTask ( ) ;
td . Actions . Add ( new ExecAction ( @"%windir%\System32\cmd.exe" ,
"/c start \"RunDS4Windows\" \"" + Process . GetCurrentProcess ( ) . MainModule . FileName + "\" -m" ,
new FileInfo ( Process . GetCurrentProcess ( ) . MainModule . FileName ) . DirectoryName ) ) ;
td . Principal . RunLevel = TaskRunLevel . Highest ;
ts . RootFolder . RegisterTaskDefinition ( "RunDS4Windows" , td ) ;
}
}
else
{
WindowsIdentity identity = WindowsIdentity . GetCurrent ( ) ;
WindowsPrincipal principal = new WindowsPrincipal ( identity ) ;
if ( principal . IsInRole ( WindowsBuiltInRole . Administrator ) )
{
TaskService ts = new TaskService ( ) ;
Microsoft . Win32 . TaskScheduler . Task tasker = ts . FindTask ( "RunDS4Windows" ) ;
if ( tasker ! = null )
{
ts . RootFolder . DeleteTask ( "RunDS4Windows" ) ;
}
}
}
}
2015-02-08 22:51:52 +01:00
private void cBDownloadLangauge_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
DownloadLang = cBDownloadLangauge . Checked ;
2014-12-13 21:12:03 +01:00
}
2015-03-15 19:16:01 +01:00
private void cBFlashWhenLate_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
FlashWhenLate = cBFlashWhenLate . Checked ;
nUDLatency . Enabled = cBFlashWhenLate . Checked ;
lbMsLatency . Enabled = cBFlashWhenLate . Checked ;
}
private void nUDLatency_ValueChanged ( object sender , EventArgs e )
{
FlashWhenLateAt = ( int ) Math . Round ( nUDLatency . Value ) ;
2015-03-15 19:16:01 +01:00
}
2014-03-28 02:50:40 +01:00
}
public class ThemeUtil
{
[DllImport("UxTheme", CharSet = CharSet.Unicode, ExactSpelling = true)]
private static extern int SetWindowTheme ( IntPtr hWnd , String appName , String partList ) ;
public static void SetTheme ( ListView lv )
{
try
{
SetWindowTheme ( lv . Handle , "Explorer" , null ) ;
}
catch { }
}
public static void SetTheme ( TreeView tv )
{
try
{
SetWindowTheme ( tv . Handle , "Explorer" , null ) ;
}
catch { }
}
}
}