Don't specify logfile for remote triggered captures

This commit is contained in:
baldurk
2016-08-03 19:13:21 +02:00
parent b1fcea3c3e
commit 724fef7bb6
3 changed files with 10 additions and 15 deletions
+2 -2
View File
@@ -484,7 +484,7 @@ struct IRemoteServer
virtual bool RemoteSupportedReplays(rdctype::array<rdctype::str> *out) = 0;
virtual uint32_t ExecuteAndInject(const char *app, const char *workingDir, const char *cmdLine,
const char *logfile, const CaptureOptions *opts) = 0;
const CaptureOptions *opts) = 0;
virtual void TakeOwnershipCapture(const char *filename) = 0;
virtual rdctype::str CopyCapture(const char *filename, float *progress) = 0;
@@ -519,7 +519,7 @@ RemoteServer_RemoteSupportedReplays(RemoteServer *remote, rdctype::array<rdctype
extern "C" RENDERDOC_API uint32_t RENDERDOC_CC
RemoteServer_ExecuteAndInject(RemoteServer *remote, const char *app, const char *workingDir,
const char *cmdLine, const char *logfile, const CaptureOptions *opts);
const char *cmdLine, const CaptureOptions *opts);
extern "C" RENDERDOC_API void RENDERDOC_CC RemoteServer_TakeOwnershipCapture(RemoteServer *remote,
const char *filename);
+5 -8
View File
@@ -383,11 +383,10 @@ void RenderDoc::BecomeRemoteServer(const char *listenhost, uint16_t port, volati
recvser->Serialise("app", app);
recvser->Serialise("workingDir", workingDir);
recvser->Serialise("cmdLine", cmdLine);
recvser->Serialise("logfile", logfile);
recvser->Serialise("opts", opts);
uint32_t ident = Process::LaunchAndInjectIntoProcess(
app.c_str(), workingDir.c_str(), cmdLine.c_str(), logfile.c_str(), &opts, false);
uint32_t ident = Process::LaunchAndInjectIntoProcess(app.c_str(), workingDir.c_str(),
cmdLine.c_str(), "", &opts, false);
sendType = eRemoteServer_ExecuteAndInject;
sendSer.Serialise("ident", ident);
@@ -507,20 +506,18 @@ public:
}
uint32_t ExecuteAndInject(const char *app, const char *workingDir, const char *cmdLine,
const char *logfile, const CaptureOptions *opts)
const CaptureOptions *opts)
{
CaptureOptions capopts = opts ? *opts : CaptureOptions();
string appstr = app && app[0] ? app : "";
string workstr = workingDir && workingDir[0] ? workingDir : "";
string cmdstr = cmdLine && cmdLine[0] ? cmdLine : "";
string logstr = logfile && logfile[0] ? logfile : "";
Serialiser sendData("", Serialiser::WRITING, false);
sendData.Serialise("app", appstr);
sendData.Serialise("workingDir", workstr);
sendData.Serialise("cmdLine", cmdstr);
sendData.Serialise("logfile", logstr);
sendData.Serialise("opts", capopts);
Send(eRemoteServer_ExecuteAndInject, sendData);
@@ -720,9 +717,9 @@ RemoteServer_RemoteSupportedReplays(RemoteServer *remote, rdctype::array<rdctype
extern "C" RENDERDOC_API uint32_t RENDERDOC_CC
RemoteServer_ExecuteAndInject(RemoteServer *remote, const char *app, const char *workingDir,
const char *cmdLine, const char *logfile, const CaptureOptions *opts)
const char *cmdLine, const CaptureOptions *opts)
{
return remote->ExecuteAndInject(app, workingDir, cmdLine, logfile, opts);
return remote->ExecuteAndInject(app, workingDir, cmdLine, opts);
}
extern "C" RENDERDOC_API void RENDERDOC_CC RemoteServer_TakeOwnershipCapture(RemoteServer *remote,
+3 -5
View File
@@ -858,7 +858,7 @@ namespace renderdoc
private static extern bool RemoteServer_RemoteSupportedReplays(IntPtr real, IntPtr outlist);
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
private static extern UInt32 RemoteServer_ExecuteAndInject(IntPtr real, IntPtr app, IntPtr workingDir, IntPtr cmdLine, IntPtr logfile, CaptureOptions opts);
private static extern UInt32 RemoteServer_ExecuteAndInject(IntPtr real, IntPtr app, IntPtr workingDir, IntPtr cmdLine, CaptureOptions opts);
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
private static extern void RemoteServer_TakeOwnershipCapture(IntPtr real, IntPtr filename);
@@ -923,19 +923,17 @@ namespace renderdoc
return ret;
}
public UInt32 ExecuteAndInject(string app, string workingDir, string cmdLine, string logfile, CaptureOptions opts)
public UInt32 ExecuteAndInject(string app, string workingDir, string cmdLine, CaptureOptions opts)
{
IntPtr app_mem = CustomMarshal.MakeUTF8String(app);
IntPtr workingDir_mem = CustomMarshal.MakeUTF8String(workingDir);
IntPtr cmdLine_mem = CustomMarshal.MakeUTF8String(cmdLine);
IntPtr logfile_mem = CustomMarshal.MakeUTF8String(logfile);
UInt32 ret = RemoteServer_ExecuteAndInject(m_Real, app_mem, workingDir_mem, cmdLine_mem, logfile_mem, opts);
UInt32 ret = RemoteServer_ExecuteAndInject(m_Real, app_mem, workingDir_mem, cmdLine_mem, opts);
CustomMarshal.Free(app_mem);
CustomMarshal.Free(workingDir_mem);
CustomMarshal.Free(cmdLine_mem);
CustomMarshal.Free(logfile_mem);
return ret;
}