| 79 | } |
| 80 | |
| 81 | static uint32_t GetCapture(uint32_t idx, char *filename, uint32_t *pathlength, uint64_t *timestamp) |
| 82 | { |
| 83 | rdcarray<CaptureData> caps = RenderDoc::Inst().GetCaptures(); |
| 84 | |
| 85 | if(idx >= (uint32_t)caps.size()) |
| 86 | { |
| 87 | if(filename) |
| 88 | filename[0] = 0; |
| 89 | if(pathlength) |
| 90 | *pathlength = 0; |
| 91 | if(timestamp) |
| 92 | *timestamp = 0; |
| 93 | return 0; |
| 94 | } |
| 95 | |
| 96 | CaptureData &c = caps[idx]; |
| 97 | |
| 98 | if(filename) |
| 99 | memcpy(filename, c.path.c_str(), sizeof(char) * (c.path.size() + 1)); |
| 100 | if(pathlength) |
| 101 | *pathlength = uint32_t(c.path.size() + 1); |
| 102 | if(timestamp) |
| 103 | *timestamp = c.timestamp; |
| 104 | |
| 105 | return 1; |
| 106 | } |
| 107 | |
| 108 | static void SetCaptureFileComments(const char *filePath, const char *comments) |
| 109 | { |
no test coverage detected