mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Allow live capture windows to stay open if switching ctx to that host
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user