mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-16 04:27:08 +00:00
Add the option to save all selected captures at once
* The filename selected is used as a base, then -frameXYZ is appended to each capture.
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
#include "os/os_specific.h"
|
||||
#include "serialise/serialiser.h"
|
||||
|
||||
static const uint32_t TargetControlProtocolVersion = 4;
|
||||
static const uint32_t TargetControlProtocolVersion = 5;
|
||||
|
||||
static bool IsProtocolVersionSupported(const uint32_t protocolVersion)
|
||||
{
|
||||
@@ -42,6 +42,10 @@ static bool IsProtocolVersionSupported(const uint32_t protocolVersion)
|
||||
if(protocolVersion == 3)
|
||||
return true;
|
||||
|
||||
// 4 -> 5 return frame number with new captures
|
||||
if(protocolVersion == 4)
|
||||
return true;
|
||||
|
||||
if(protocolVersion == TargetControlProtocolVersion)
|
||||
return true;
|
||||
|
||||
@@ -218,6 +222,8 @@ void RenderDoc::TargetControlClientThread(uint32_t version, Network::Socket *cli
|
||||
SERIALISE_ELEMENT(buf);
|
||||
if(version >= 3)
|
||||
SERIALISE_ELEMENT(captures.back().driver);
|
||||
if(version >= 5)
|
||||
SERIALISE_ELEMENT(captures.back().frameNumber);
|
||||
}
|
||||
}
|
||||
else if(childprocs.size() != children.size())
|
||||
@@ -729,6 +735,14 @@ public:
|
||||
SERIALISE_ELEMENT(thumbnail);
|
||||
if(m_Version >= 3)
|
||||
SERIALISE_ELEMENT(driver);
|
||||
if(m_Version >= 5)
|
||||
{
|
||||
SERIALISE_ELEMENT(msg.newCapture.frameNumber);
|
||||
}
|
||||
else
|
||||
{
|
||||
msg.newCapture.frameNumber = msg.newCapture.captureId + 1;
|
||||
}
|
||||
}
|
||||
|
||||
if(driver != RDCDriver::Unknown)
|
||||
@@ -736,8 +750,9 @@ public:
|
||||
|
||||
msg.newCapture.local = FileIO::exists(msg.newCapture.path.c_str());
|
||||
|
||||
RDCLOG("Got a new capture: %d (time %llu) %d byte thumbnail", msg.newCapture.captureId,
|
||||
msg.newCapture.timestamp, thumbnail.count());
|
||||
RDCLOG("Got a new capture: %d (frame %u) (time %llu) %d byte thumbnail",
|
||||
msg.newCapture.captureId, msg.newCapture.frameNumber, msg.newCapture.timestamp,
|
||||
thumbnail.count());
|
||||
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
|
||||
Reference in New Issue
Block a user