Allow live capture windows to stay open if switching ctx to that host

This commit is contained in:
baldurk
2016-08-29 19:42:48 +02:00
parent 13b09e410b
commit 90beef8f3c
2 changed files with 25 additions and 2 deletions
@@ -133,6 +133,14 @@ namespace renderdocui.Windows
m_QueueCapture = true;
}
public string Hostname
{
get
{
return m_Host;
}
}
private void LiveCapture_Shown(object sender, EventArgs e)
{
m_ConnectThread = Helpers.NewThread(new ThreadStart(ConnectionThreadEntry));
+17 -2
View File
@@ -1130,22 +1130,38 @@ namespace renderdocui.Windows
if(item == null)
return;
RemoteHost host = item.Tag as RemoteHost;
foreach (var live in m_LiveCaptures)
{
// allow live captures to this host to stay open, that way
// we can connect to a live capture, then switch into that
// context
if (live.Hostname == host.Hostname)
continue;
if (live.CheckAllowClose() == false)
return;
}
if (!PromptCloseLog())
return;
foreach (var live in m_LiveCaptures.ToArray())
{
// allow live captures to this host to stay open, that way
// we can connect to a live capture, then switch into that
// context
if (live.Hostname == host.Hostname)
continue;
live.CleanItems();
live.Close();
}
m_Core.Renderer.DisconnectFromRemoteServer();
if (item.Tag == null)
if (host == null)
{
contextChooser.Image = global::renderdocui.Properties.Resources.house;
contextChooser.Text = "Replay Context: Local";
@@ -1158,7 +1174,6 @@ namespace renderdocui.Windows
}
else
{
RemoteHost host = item.Tag as RemoteHost;
contextChooser.Text = "Replay Context: " + host.Hostname;
contextChooser.Image = host.ServerRunning
? global::renderdocui.Properties.Resources.connect