mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Allow shutting down the active remote server
This commit is contained in:
@@ -370,8 +370,19 @@ namespace renderdocui.Code
|
||||
m_Remote = null;
|
||||
}
|
||||
|
||||
public void ShutdownServer()
|
||||
{
|
||||
if(m_Remote != null)
|
||||
m_Remote.ShutdownServerAndConnection();
|
||||
|
||||
m_Remote = null;
|
||||
}
|
||||
|
||||
public void PingRemote()
|
||||
{
|
||||
if (m_Remote == null)
|
||||
return;
|
||||
|
||||
if (Monitor.TryEnter(m_Remote))
|
||||
{
|
||||
try
|
||||
|
||||
+3
-1
@@ -310,8 +310,10 @@
|
||||
this.ClientSize = new System.Drawing.Size(602, 460);
|
||||
this.Controls.Add(tableLayoutPanel1);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.Name = "RemoteManager";
|
||||
this.MinimizeBox = false;
|
||||
this.MaximizeBox = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Remote Host Manager";
|
||||
tableLayoutPanel1.ResumeLayout(false);
|
||||
|
||||
@@ -371,7 +371,7 @@ namespace renderdocui.Windows.Dialogs
|
||||
{
|
||||
connect.Text = "Shutdown";
|
||||
|
||||
if (host.Busy || host.Connected)
|
||||
if (host.Busy && !host.Connected)
|
||||
connect.Enabled = false;
|
||||
}
|
||||
else
|
||||
@@ -476,11 +476,19 @@ namespace renderdocui.Windows.Dialogs
|
||||
// shut down
|
||||
try
|
||||
{
|
||||
RemoteServer server = StaticExports.CreateRemoteServer(host.Hostname, 0);
|
||||
server.ShutdownServerAndConnection();
|
||||
hosts.BeginUpdate();
|
||||
SetRemoteServerLive(node, false, false);
|
||||
hosts.EndUpdate();
|
||||
if (host.Connected)
|
||||
{
|
||||
m_Core.Renderer.ShutdownServer();
|
||||
SetRemoteServerLive(node, false, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoteServer server = StaticExports.CreateRemoteServer(host.Hostname, 0);
|
||||
server.ShutdownServerAndConnection();
|
||||
hosts.BeginUpdate();
|
||||
SetRemoteServerLive(node, false, false);
|
||||
hosts.EndUpdate();
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user