Handle connection errors properly, displaying the error message

This commit is contained in:
baldurk
2016-08-24 15:53:55 +02:00
parent ec67b41dfe
commit c9474f5bc3
2 changed files with 8 additions and 4 deletions
+7 -1
View File
@@ -1186,7 +1186,13 @@ namespace renderdocui.Windows
? global::renderdocui.Properties.Resources.connect
: global::renderdocui.Properties.Resources.disconnect;
if (host.VersionMismatch)
if (m_Core.Renderer.InitException != null)
{
contextChooser.Image = global::renderdocui.Properties.Resources.cross;
contextChooser.Text = "Replay Context: Local";
statusText.Text = "Connection failed: " + m_Core.Renderer.InitException.Status.Str();
}
else if (host.VersionMismatch)
{
statusText.Text = "Remote server is not running RenderDoc " + VersionString;
}