mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 19:14:20 +01:00
Merge branch 'jay' into vigem-udpserver
This commit is contained in:
commit
1bc5da2c6d
@ -269,14 +269,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