mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-23 23:21:49 +01:00
Some minor tweaks and fixes
This commit is contained in:
parent
df22c91b56
commit
a86d8deb4a
@ -257,14 +257,26 @@ namespace DS4Windows
|
||||
}
|
||||
|
||||
await Task.Delay(100);
|
||||
_udpServer.Start(getUDPServerPortNum());
|
||||
|
||||
foreach (DS4Device dev in devices)
|
||||
var UDP_SERVER_PORT = Global.getUDPServerPortNum();
|
||||
try
|
||||
{
|
||||
dev.queueEvent(() =>
|
||||
_udpServer.Start(UDP_SERVER_PORT);
|
||||
foreach (DS4Device dev in devices)
|
||||
{
|
||||
dev.Report += dev.MotionEvent;
|
||||
});
|
||||
dev.queueEvent(() =>
|
||||
{
|
||||
dev.Report += dev.MotionEvent;
|
||||
});
|
||||
}
|
||||
LogDebug("UDP server listening on port " + UDP_SERVER_PORT);
|
||||
}
|
||||
catch (System.Net.Sockets.SocketException ex)
|
||||
{
|
||||
var errMsg = String.Format("Couldn't start UDP server on port {0}, outside applications won't be able to access pad data ({1})", UDP_SERVER_PORT, ex.SocketErrorCode);
|
||||
|
||||
LogDebug(errMsg, true);
|
||||
Log.LogToTray(errMsg, true, true);
|
||||
}
|
||||
|
||||
changingUDPPort = false;
|
||||
|
2
DS4Windows/DS4Forms/DS4Form.Designer.cs
generated
2
DS4Windows/DS4Forms/DS4Form.Designer.cs
generated
@ -1234,7 +1234,6 @@
|
||||
resources.ApplyResources(this.ckUdpServ, "ckUdpServ");
|
||||
this.ckUdpServ.Name = "ckUdpServ";
|
||||
this.ckUdpServ.UseVisualStyleBackColor = true;
|
||||
this.ckUdpServ.CheckedChanged += new System.EventHandler(this.CkUdpServ_CheckedChanged);
|
||||
//
|
||||
// nUDUdpPortNum
|
||||
//
|
||||
@ -1255,7 +1254,6 @@
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nUDUdpPortNum.Leave += new System.EventHandler(this.NUDUdpPortNum_Leave);
|
||||
//
|
||||
// languagePackComboBox1
|
||||
//
|
||||
|
@ -400,9 +400,12 @@ namespace DS4Windows
|
||||
StartWindowsCheckBox.CheckedChanged += new EventHandler(StartWindowsCheckBox_CheckedChanged);
|
||||
new ToolTip().SetToolTip(StartWindowsCheckBox, Properties.Resources.RunAtStartup);
|
||||
|
||||
ckUdpServ.Checked = isUsingUDPServer();
|
||||
ckUdpServ.Checked = nUDUdpPortNum.Enabled = isUsingUDPServer();
|
||||
nUDUdpPortNum.Value = getUDPServerPortNum();
|
||||
|
||||
ckUdpServ.CheckedChanged += CkUdpServ_CheckedChanged;
|
||||
nUDUdpPortNum.Leave += NUDUdpPortNum_Leave;
|
||||
|
||||
populateHoverTextDict();
|
||||
|
||||
cBController1.KeyPress += CBController_KeyPress;
|
||||
@ -2568,9 +2571,13 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question
|
||||
|
||||
private void NUDUdpPortNum_Leave(object sender, EventArgs e)
|
||||
{
|
||||
nUDUdpPortNum.Enabled = false;
|
||||
setUDPServerPort((int)nUDUdpPortNum.Value);
|
||||
WaitUDPPortChange();
|
||||
int curValue = (int)nUDUdpPortNum.Value;
|
||||
if (curValue != getUDPServerPortNum())
|
||||
{
|
||||
setUDPServerPort(curValue);
|
||||
nUDUdpPortNum.Enabled = false;
|
||||
WaitUDPPortChange();
|
||||
}
|
||||
}
|
||||
|
||||
private async void WaitUDPPortChange()
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user