mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Display the local filename even when copying to remote for replaying
This commit is contained in:
@@ -453,9 +453,11 @@ namespace renderdocui.Code
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadLogfile(string logFile, bool temporary, bool local)
|
||||
// generally logFile == origFilename, but if the log was transferred remotely then origFilename
|
||||
// is the log locally before being copied we can present to the user in dialogs, etc.
|
||||
public void LoadLogfile(string logFile, string origFilename, bool temporary, bool local)
|
||||
{
|
||||
m_LogFile = logFile;
|
||||
m_LogFile = origFilename;
|
||||
|
||||
m_LogLocal = local;
|
||||
|
||||
@@ -474,7 +476,7 @@ namespace renderdocui.Code
|
||||
|
||||
Thread modalThread = Helpers.NewThread(new ThreadStart(() =>
|
||||
{
|
||||
modal.SetModalText(string.Format("Loading Log {0}.", m_LogFile));
|
||||
modal.SetModalText(string.Format("Loading Log: {0}", origFilename));
|
||||
|
||||
AppWindow.BeginInvoke(new Action(() =>
|
||||
{
|
||||
@@ -517,7 +519,7 @@ namespace renderdocui.Code
|
||||
errmsg = ((ReplayCreateStatus)m_Renderer.InitException.Data["status"]).Str();
|
||||
|
||||
MessageBox.Show(String.Format("{0}\nFailed to open file for replay: {1}.\n\n" +
|
||||
"Check diagnostic log in Help menu for more details.", logFile, errmsg),
|
||||
"Check diagnostic log in Help menu for more details.", origFilename, errmsg),
|
||||
"Error opening log", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
|
||||
progressThread = false;
|
||||
@@ -533,9 +535,9 @@ namespace renderdocui.Code
|
||||
return;
|
||||
}
|
||||
|
||||
if (!temporary && local)
|
||||
if (!temporary)
|
||||
{
|
||||
m_Config.AddRecentFile(m_Config.RecentLogFiles, logFile, 10);
|
||||
m_Config.AddRecentFile(m_Config.RecentLogFiles, origFilename, 10);
|
||||
|
||||
if (File.Exists(Core.ConfigFilename))
|
||||
m_Config.Serialize(Core.ConfigFilename);
|
||||
@@ -595,7 +597,7 @@ namespace renderdocui.Code
|
||||
MessageBox.Show(String.Format("{0}\nThis log opened with degraded support - " +
|
||||
"this could mean missing hardware support caused a fallback to software rendering.\n\n" +
|
||||
"This warning will not appear every time this happens, " +
|
||||
"check debug errors/warnings window for more details.", logFile),
|
||||
"check debug errors/warnings window for more details.", origFilename),
|
||||
"Degraded support of log", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
}
|
||||
|
||||
|
||||
@@ -710,6 +710,8 @@ namespace renderdocui.Windows
|
||||
|
||||
Thread thread = null;
|
||||
|
||||
string origFilename = filename;
|
||||
|
||||
// if driver is empty something went wrong loading the log, let it be handled as usual
|
||||
// below. Otherwise indicate that support is missing.
|
||||
if (driver.Length > 0 && support == ReplaySupport.Unsupported)
|
||||
@@ -741,7 +743,7 @@ namespace renderdocui.Windows
|
||||
{
|
||||
filename = m_Core.Renderer.CopyCaptureToRemote(filename, this);
|
||||
|
||||
local = false;
|
||||
// deliberately leave local as true so that we keep referring to the locally saved log
|
||||
|
||||
// some error
|
||||
if (filename == "")
|
||||
@@ -755,7 +757,7 @@ namespace renderdocui.Windows
|
||||
}
|
||||
}
|
||||
|
||||
thread = Helpers.NewThread(new ThreadStart(() => m_Core.LoadLogfile(filename, temporary, local)));
|
||||
thread = Helpers.NewThread(new ThreadStart(() => m_Core.LoadLogfile(filename, origFilename, temporary, local)));
|
||||
}
|
||||
|
||||
thread.Start();
|
||||
@@ -763,7 +765,7 @@ namespace renderdocui.Windows
|
||||
if(!remoteReplay)
|
||||
m_Core.Config.LastLogPath = Path.GetDirectoryName(filename);
|
||||
|
||||
statusText.Text = "Loading " + filename + "...";
|
||||
statusText.Text = "Loading " + origFilename + "...";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user