mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-23 01:39:17 +01:00
Version 1.4.0.71
Rumble motors swapped to be correct Bug fixes, including crashes and a small windows when minimized on Win7
This commit is contained in:
parent
0f4297bd9e
commit
b43ee4f4e3
@ -425,7 +425,7 @@ namespace DS4Control
|
|||||||
|
|
||||||
if (processingData[ind].Rumble[1] == 0x08)
|
if (processingData[ind].Rumble[1] == 0x08)
|
||||||
{
|
{
|
||||||
setRumble(Small, Big, ind);
|
setRumble(Big, Small, ind);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -665,8 +665,6 @@ namespace DS4Control
|
|||||||
Global.getShiftCustomKey(device, customButton.Key) == 0 &&
|
Global.getShiftCustomKey(device, customButton.Key) == 0 &&
|
||||||
Global.getShiftCustomButton(device, customButton.Key) == X360Controls.None))
|
Global.getShiftCustomButton(device, customButton.Key) == X360Controls.None))
|
||||||
{
|
{
|
||||||
if (customButton.Key == DS4Controls.Square)
|
|
||||||
Console.WriteLine("hello");
|
|
||||||
DS4KeyType keyType = Global.getCustomKeyType(device, customButton.Key);
|
DS4KeyType keyType = Global.getCustomKeyType(device, customButton.Key);
|
||||||
int keyvalue = 0;
|
int keyvalue = 0;
|
||||||
switch (customButton.Value)
|
switch (customButton.Value)
|
||||||
|
@ -132,6 +132,7 @@ namespace ScpServer
|
|||||||
nUDIdleDisconnect.Value = Math.Round((decimal)(Global.getIdleDisconnectTimeout(device) / 60d), 1);
|
nUDIdleDisconnect.Value = Math.Round((decimal)(Global.getIdleDisconnectTimeout(device) / 60d), 1);
|
||||||
cBIdleDisconnect.Checked = Global.getIdleDisconnectTimeout(device) > 0;
|
cBIdleDisconnect.Checked = Global.getIdleDisconnectTimeout(device) > 0;
|
||||||
numUDMouseSens.Value = Global.getButtonMouseSensitivity(device);
|
numUDMouseSens.Value = Global.getButtonMouseSensitivity(device);
|
||||||
|
cBMouseAccel.Checked = Global.getMouseAccel(device);
|
||||||
// Force update of color choosers
|
// Force update of color choosers
|
||||||
alphacolor = Math.Max(redBar.Value, Math.Max(greenBar.Value, blueBar.Value));
|
alphacolor = Math.Max(redBar.Value, Math.Max(greenBar.Value, blueBar.Value));
|
||||||
reg = Color.FromArgb(color.red, color.green, color.blue);
|
reg = Color.FromArgb(color.red, color.green, color.blue);
|
||||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.4.0.7")]
|
[assembly: AssemblyVersion("1.4.0.71")]
|
||||||
[assembly: AssemblyFileVersion("1.4.0.7")]
|
[assembly: AssemblyFileVersion("1.4.0.71")]
|
||||||
|
1
DS4Tool/ScpForm.Designer.cs
generated
1
DS4Tool/ScpForm.Designer.cs
generated
@ -889,7 +889,6 @@
|
|||||||
this.Controls.Add(this.pnlButton);
|
this.Controls.Add(this.pnlButton);
|
||||||
this.Name = "ScpForm";
|
this.Name = "ScpForm";
|
||||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ScpForm_Closing);
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ScpForm_Closing);
|
||||||
this.Load += new System.EventHandler(this.Form_Load);
|
|
||||||
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.ScpForm_DragDrop);
|
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.ScpForm_DragDrop);
|
||||||
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.ScpForm_DragEnter);
|
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.ScpForm_DragEnter);
|
||||||
this.Resize += new System.EventHandler(this.Form_Resize);
|
this.Resize += new System.EventHandler(this.Form_Resize);
|
||||||
|
@ -93,6 +93,146 @@ namespace ScpServer
|
|||||||
if (File.Exists(appdatapath + "\\Profiles.xml"))
|
if (File.Exists(appdatapath + "\\Profiles.xml"))
|
||||||
tt.SetToolTip(linkUninstall, Properties.Resources.IfRemovingDS4Windows);
|
tt.SetToolTip(linkUninstall, Properties.Resources.IfRemovingDS4Windows);
|
||||||
tt.SetToolTip(cBSwipeProfiles, Properties.Resources.TwoFingerSwipe);
|
tt.SetToolTip(cBSwipeProfiles, Properties.Resources.TwoFingerSwipe);
|
||||||
|
{
|
||||||
|
var AppCollectionThread = new System.Threading.Thread(() => CheckDrivers());
|
||||||
|
AppCollectionThread.IsBackground = true;
|
||||||
|
AppCollectionThread.Start();
|
||||||
|
if (File.Exists(exepath + "\\Auto Profiles.xml")
|
||||||
|
&& File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool\\Auto Profiles.xml"))
|
||||||
|
new SaveWhere(true).ShowDialog();
|
||||||
|
else if (File.Exists(exepath + "\\Auto Profiles.xml"))
|
||||||
|
Global.SaveWhere(exepath);
|
||||||
|
else if (File.Exists(appdatapath + "\\Auto Profiles.xml"))
|
||||||
|
Global.SaveWhere(appdatapath);
|
||||||
|
else if (!File.Exists(exepath + "\\Auto Profiles.xml")
|
||||||
|
&& !File.Exists(appdatapath + "\\Auto Profiles.xml"))
|
||||||
|
{
|
||||||
|
new SaveWhere(false).ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (String.IsNullOrEmpty(Global.appdatapath))
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Graphics g = this.CreateGraphics();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
dpix = g.DpiX;
|
||||||
|
dpiy = g.DpiY;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
g.Dispose();
|
||||||
|
}
|
||||||
|
Icon = Properties.Resources.DS4;
|
||||||
|
notifyIcon1.Icon = Properties.Resources.DS4;
|
||||||
|
rootHub = new DS4Control.Control();
|
||||||
|
rootHub.Debug += On_Debug;
|
||||||
|
Log.GuiLog += On_Debug;
|
||||||
|
Log.TrayIconLog += ShowNotification;
|
||||||
|
// tmrUpdate.Enabled = true; TODO remove tmrUpdate and leave tick()
|
||||||
|
|
||||||
|
Directory.CreateDirectory(Global.appdatapath);
|
||||||
|
Global.Load();
|
||||||
|
if (!Global.Save()) //if can't write to file
|
||||||
|
if (MessageBox.Show("Cannot write at current locataion\nCopy Settings to appdata?", "DS4Windows",
|
||||||
|
MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.Yes)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(appdatapath);
|
||||||
|
File.Copy(exepath + "\\Profiles.xml", appdatapath + "\\Profiles.xml");
|
||||||
|
File.Copy(exepath + "\\Auto Profiles.xml", appdatapath + "\\Auto Profiles.xml");
|
||||||
|
Directory.CreateDirectory(appdatapath + "\\Profiles");
|
||||||
|
foreach (string s in Directory.GetFiles(exepath + "\\Profiles"))
|
||||||
|
{
|
||||||
|
File.Copy(s, appdatapath + "\\Profiles\\" + Path.GetFileName(s));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
MessageBox.Show("Copy complete, please relaunch DS4Windows and remove settings from Program Directory", "DS4Windows");
|
||||||
|
Global.appdatapath = null;
|
||||||
|
Close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("DS4Windows cannot edit settings here, This will now close", "DS4Windows");
|
||||||
|
Global.appdatapath = null;
|
||||||
|
Close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
foreach (ToolStripMenuItem t in shortcuts)
|
||||||
|
t.DropDownItemClicked += Profile_Changed_Menu;
|
||||||
|
hideDS4CheckBox.CheckedChanged -= hideDS4CheckBox_CheckedChanged;
|
||||||
|
hideDS4CheckBox.Checked = Global.getUseExclusiveMode();
|
||||||
|
hideDS4CheckBox.CheckedChanged += hideDS4CheckBox_CheckedChanged;
|
||||||
|
cBDisconnectBT.Checked = Global.getDCBTatStop();
|
||||||
|
// New settings
|
||||||
|
this.Width = Global.getFormWidth();
|
||||||
|
this.Height = Global.getFormHeight();
|
||||||
|
startMinimizedCheckBox.CheckedChanged -= startMinimizedCheckBox_CheckedChanged;
|
||||||
|
startMinimizedCheckBox.Checked = Global.getStartMinimized();
|
||||||
|
startMinimizedCheckBox.CheckedChanged += startMinimizedCheckBox_CheckedChanged;
|
||||||
|
if (startMinimizedCheckBox.Checked)
|
||||||
|
this.WindowState = FormWindowState.Minimized;
|
||||||
|
Form_Resize(null, null);
|
||||||
|
RefreshProfiles();
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
Global.LoadProfile(i, true, rootHub);
|
||||||
|
}
|
||||||
|
LoadP();
|
||||||
|
Global.ControllerStatusChange += ControllerStatusChange;
|
||||||
|
bool start = true;
|
||||||
|
foreach (string s in arguements)
|
||||||
|
if (s == "stop")
|
||||||
|
{
|
||||||
|
start = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (btnStartStop.Enabled && start)
|
||||||
|
btnStartStop_Clicked();
|
||||||
|
startToolStripMenuItem.Text = btnStartStop.Text;
|
||||||
|
cBNotifications.Checked = Global.getNotifications();
|
||||||
|
cBSwipeProfiles.Checked = Global.getSwipeProfiles();
|
||||||
|
int checkwhen = Global.getCheckWhen();
|
||||||
|
cBUpdate.Checked = checkwhen > 0;
|
||||||
|
if (checkwhen > 23)
|
||||||
|
{
|
||||||
|
cBUpdateTime.SelectedIndex = 1;
|
||||||
|
nUDUpdateTime.Value = checkwhen / 24;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cBUpdateTime.SelectedIndex = 0;
|
||||||
|
nUDUpdateTime.Value = checkwhen;
|
||||||
|
}
|
||||||
|
Uri url = new Uri("http://ds4windows.com/Files/Builds/newest.txt"); //Sorry other devs, gonna have to find your own server
|
||||||
|
|
||||||
|
|
||||||
|
if (checkwhen > 0 && DateTime.Now >= Global.getLastChecked() + TimeSpan.FromHours(checkwhen))
|
||||||
|
{
|
||||||
|
wc.DownloadFileAsync(url, Global.appdatapath + "\\version.txt");
|
||||||
|
wc.DownloadFileCompleted += Check_Version;
|
||||||
|
Global.setLastChecked(DateTime.Now);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (File.Exists(exepath + "\\Updater.exe"))
|
||||||
|
{
|
||||||
|
System.Threading.Thread.Sleep(2000);
|
||||||
|
File.Delete(exepath + "\\Updater.exe");
|
||||||
|
}
|
||||||
|
//test.Start();
|
||||||
|
hotkeystimer.Start();
|
||||||
|
hotkeystimer.Tick += Hotkeys;
|
||||||
|
test.Tick += test_Tick;
|
||||||
|
if (!System.IO.Directory.Exists(Global.appdatapath + "\\Virtual Bus Driver"))
|
||||||
|
linkUninstall.Visible = false;
|
||||||
|
StartWindowsCheckBox.Checked = File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\DS4Windows.lnk");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetTopWindowName()
|
public static string GetTopWindowName()
|
||||||
@ -134,149 +274,6 @@ namespace ScpServer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void Form_Load(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
SetupArrays();
|
|
||||||
var AppCollectionThread = new System.Threading.Thread(() => CheckDrivers());
|
|
||||||
AppCollectionThread.IsBackground = true;
|
|
||||||
AppCollectionThread.Start();
|
|
||||||
if (File.Exists(exepath + "\\Auto Profiles.xml")
|
|
||||||
&& File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool\\Auto Profiles.xml"))
|
|
||||||
new SaveWhere(true).ShowDialog();
|
|
||||||
else if (File.Exists(exepath + "\\Auto Profiles.xml"))
|
|
||||||
Global.SaveWhere(exepath);
|
|
||||||
else if (File.Exists(appdatapath + "\\Auto Profiles.xml"))
|
|
||||||
Global.SaveWhere(appdatapath);
|
|
||||||
else if (!File.Exists(exepath + "\\Auto Profiles.xml")
|
|
||||||
&& !File.Exists(appdatapath + "\\Auto Profiles.xml"))
|
|
||||||
{
|
|
||||||
new SaveWhere(false).ShowDialog();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(Global.appdatapath))
|
|
||||||
{
|
|
||||||
Close();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Graphics g = this.CreateGraphics();
|
|
||||||
try
|
|
||||||
{
|
|
||||||
dpix = g.DpiX;
|
|
||||||
dpiy = g.DpiY;
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
g.Dispose();
|
|
||||||
}
|
|
||||||
Icon = Properties.Resources.DS4;
|
|
||||||
notifyIcon1.Icon = Properties.Resources.DS4;
|
|
||||||
rootHub = new DS4Control.Control();
|
|
||||||
rootHub.Debug += On_Debug;
|
|
||||||
Log.GuiLog += On_Debug;
|
|
||||||
Log.TrayIconLog += ShowNotification;
|
|
||||||
// tmrUpdate.Enabled = true; TODO remove tmrUpdate and leave tick()
|
|
||||||
|
|
||||||
Directory.CreateDirectory(Global.appdatapath);
|
|
||||||
Global.Load();
|
|
||||||
if (!Global.Save()) //if can't write to file
|
|
||||||
if (MessageBox.Show("Cannot write at current locataion\nCopy Settings to appdata?", "DS4Windows",
|
|
||||||
MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.Yes)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Directory.CreateDirectory(appdatapath);
|
|
||||||
File.Copy(exepath + "\\Profiles.xml", appdatapath + "\\Profiles.xml");
|
|
||||||
File.Copy(exepath + "\\Auto Profiles.xml", appdatapath + "\\Auto Profiles.xml");
|
|
||||||
Directory.CreateDirectory(appdatapath + "\\Profiles");
|
|
||||||
foreach (string s in Directory.GetFiles(exepath + "\\Profiles"))
|
|
||||||
{
|
|
||||||
File.Copy(s, appdatapath + "\\Profiles\\" + Path.GetFileName(s));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
MessageBox.Show("Copy complete, please relaunch DS4Windows and remove settings from Program Directory", "DS4Windows");
|
|
||||||
Global.appdatapath = null;
|
|
||||||
Close();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageBox.Show("DS4Windows cannot edit settings here, This will now close", "DS4Windows");
|
|
||||||
Global.appdatapath = null;
|
|
||||||
Close();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
foreach (ToolStripMenuItem t in shortcuts)
|
|
||||||
t.DropDownItemClicked += Profile_Changed_Menu;
|
|
||||||
hideDS4CheckBox.CheckedChanged -= hideDS4CheckBox_CheckedChanged;
|
|
||||||
hideDS4CheckBox.Checked = Global.getUseExclusiveMode();
|
|
||||||
hideDS4CheckBox.CheckedChanged += hideDS4CheckBox_CheckedChanged;
|
|
||||||
cBDisconnectBT.Checked = Global.getDCBTatStop();
|
|
||||||
// New settings
|
|
||||||
this.Width = Global.getFormWidth();
|
|
||||||
this.Height = Global.getFormHeight();
|
|
||||||
startMinimizedCheckBox.CheckedChanged -= startMinimizedCheckBox_CheckedChanged;
|
|
||||||
startMinimizedCheckBox.Checked = Global.getStartMinimized();
|
|
||||||
startMinimizedCheckBox.CheckedChanged += startMinimizedCheckBox_CheckedChanged;
|
|
||||||
if (startMinimizedCheckBox.Checked)
|
|
||||||
this.WindowState = FormWindowState.Minimized;
|
|
||||||
Form_Resize(sender, e);
|
|
||||||
RefreshProfiles();
|
|
||||||
for (int i = 0; i < 4; i++)
|
|
||||||
{
|
|
||||||
Global.LoadProfile(i, true, rootHub);
|
|
||||||
}
|
|
||||||
LoadP();
|
|
||||||
Global.ControllerStatusChange += ControllerStatusChange;
|
|
||||||
bool start = true;
|
|
||||||
foreach (string s in arguements)
|
|
||||||
if (s == "stop")
|
|
||||||
{
|
|
||||||
start = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (btnStartStop.Enabled && start)
|
|
||||||
btnStartStop_Clicked();
|
|
||||||
startToolStripMenuItem.Text = btnStartStop.Text;
|
|
||||||
cBNotifications.Checked = Global.getNotifications();
|
|
||||||
cBSwipeProfiles.Checked = Global.getSwipeProfiles();
|
|
||||||
int checkwhen = Global.getCheckWhen();
|
|
||||||
cBUpdate.Checked = checkwhen > 0;
|
|
||||||
if (checkwhen > 23)
|
|
||||||
{
|
|
||||||
cBUpdateTime.SelectedIndex = 1;
|
|
||||||
nUDUpdateTime.Value = checkwhen / 24;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cBUpdateTime.SelectedIndex = 0;
|
|
||||||
nUDUpdateTime.Value = checkwhen;
|
|
||||||
}
|
|
||||||
Uri url = new Uri("http://ds4windows.com/Files/Builds/newest.txt"); //Sorry other devs, gonna have to find your own server
|
|
||||||
|
|
||||||
|
|
||||||
if (checkwhen > 0 && DateTime.Now >= Global.getLastChecked() + TimeSpan.FromHours(checkwhen))
|
|
||||||
{
|
|
||||||
wc.DownloadFileAsync(url, Global.appdatapath + "\\version.txt");
|
|
||||||
wc.DownloadFileCompleted += Check_Version;
|
|
||||||
Global.setLastChecked(DateTime.Now);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (File.Exists(exepath + "\\Updater.exe"))
|
|
||||||
{
|
|
||||||
System.Threading.Thread.Sleep(2000);
|
|
||||||
File.Delete(exepath + "\\Updater.exe");
|
|
||||||
}
|
|
||||||
//test.Start();
|
|
||||||
hotkeystimer.Start();
|
|
||||||
hotkeystimer.Tick += Hotkeys;
|
|
||||||
test.Tick += test_Tick;
|
|
||||||
if (!System.IO.Directory.Exists(Global.appdatapath + "\\Virtual Bus Driver"))
|
|
||||||
linkUninstall.Visible = false;
|
|
||||||
StartWindowsCheckBox.Checked = File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\DS4Windows.lnk");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void test_Tick(object sender, EventArgs e)
|
private void test_Tick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
lBTest.Visible = true;
|
lBTest.Visible = true;
|
||||||
@ -552,14 +549,14 @@ namespace ScpServer
|
|||||||
{
|
{
|
||||||
this.Hide();
|
this.Hide();
|
||||||
this.ShowInTaskbar = false;
|
this.ShowInTaskbar = false;
|
||||||
this.FormBorderStyle = FormBorderStyle.SizableToolWindow;
|
//this.FormBorderStyle = FormBorderStyle.SizableToolWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (FormWindowState.Normal == this.WindowState)
|
else if (FormWindowState.Normal == this.WindowState)
|
||||||
{
|
{
|
||||||
this.Show();
|
this.Show();
|
||||||
this.ShowInTaskbar = true;
|
this.ShowInTaskbar = true;
|
||||||
this.FormBorderStyle = FormBorderStyle.Sizable;
|
//this.FormBorderStyle = FormBorderStyle.Sizable;
|
||||||
}
|
}
|
||||||
chData.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
|
chData.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user