If no capture directory is specified in the UI, save to $TEMP/RenderDoc

This commit is contained in:
baldurk
2016-11-21 17:59:59 +01:00
parent aa8139fcb4
commit c068a71903
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -103,8 +103,14 @@ QString CaptureContext::TempLogFilename(QString appname)
QDir dir(folder);
if(folder == "" || !dir.exists())
{
dir = QDir(QDir::tempPath());
dir.mkdir("RenderDoc");
dir = QDir(dir.absoluteFilePath("RenderDoc"));
}
return dir.absoluteFilePath(
appname + "_" + QDateTime::currentDateTimeUtc().toString("yyyy.MM.dd_HH.mm.ss") + ".rdc");
}
+1 -1
View File
@@ -700,7 +700,7 @@ namespace renderdocui.Code
try
{
if (folder.Length == 0 || !Directory.Exists(folder))
folder = Path.GetTempPath();
folder = Path.Combine(Path.GetTempPath(), "RenderDoc");
}
catch (ArgumentException)
{