mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-15 02:11:22 +00:00
Add api for applications aware of renderdoc to get list of captures
This commit is contained in:
1 parent
6fbb247efd
commit
67b8b4521a
8 files changed
+69
-22
No files matched your search
@@ -102,6 +102,31 @@ const wchar_t* RENDERDOC_CC RENDERDOC_GetLogFile()
|
||||
return RDCGETLOGFILE();
|
||||
}
|
||||
|
||||
extern "C" RENDERDOC_API
|
||||
bool RENDERDOC_CC RENDERDOC_GetCapture(uint32_t idx, wchar_t *logfile, uint32_t *pathlength, uint64_t *timestamp)
|
||||
{
|
||||
vector<CaptureData> caps = RenderDoc::Inst().GetCaptures();
|
||||
|
||||
if(idx >= (uint32_t)caps.size())
|
||||
{
|
||||
if(logfile) logfile[0] = 0;
|
||||
if(pathlength) *pathlength = 0;
|
||||
if(timestamp) *timestamp = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
CaptureData &c = caps[idx];
|
||||
|
||||
if(logfile)
|
||||
memcpy(logfile, c.path.c_str(), sizeof(wchar_t)*(c.path.size()+1));
|
||||
if(pathlength)
|
||||
*pathlength = uint32_t(c.path.size()+1);
|
||||
if(timestamp)
|
||||
*timestamp = c.timestamp;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
extern "C" RENDERDOC_API
|
||||
void RENDERDOC_CC RENDERDOC_TriggerExceptionHandler(void *exceptionPtrs, bool crashed)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user