mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
Print custom lines of API support on the version string of renderdoccmd
* An easy way to check what support is compiled into this binary.
This commit is contained in:
@@ -153,6 +153,8 @@ static int command_usage(std::string command = "")
|
||||
return 2;
|
||||
}
|
||||
|
||||
static std::vector<std::string> version_lines;
|
||||
|
||||
struct VersionCommand : public Command
|
||||
{
|
||||
virtual void AddOptions(cmdline::parser &parser) {}
|
||||
@@ -161,13 +163,21 @@ struct VersionCommand : public Command
|
||||
virtual bool IsCaptureCommand() { return false; }
|
||||
virtual int Execute(cmdline::parser &parser, const CaptureOptions &)
|
||||
{
|
||||
std::cout << "renderdoccmd " << RENDERDOC_GetVersionString()
|
||||
<< (sizeof(uintptr_t) == sizeof(uint64_t) ? " x64 " : " x86 ")
|
||||
<< RENDERDOC_GetCommitHash() << std::endl;
|
||||
std::cout << "renderdoccmd " << (sizeof(uintptr_t) == sizeof(uint64_t) ? "x64 " : "x86 ")
|
||||
<< RENDERDOC_GetVersionString() << "-" << RENDERDOC_GetCommitHash() << std::endl;
|
||||
|
||||
for(size_t i = 0; i < version_lines.size(); i++)
|
||||
std::cout << version_lines[i] << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
void add_version_line(const std::string &str)
|
||||
{
|
||||
version_lines.push_back(str);
|
||||
}
|
||||
|
||||
struct HelpCommand : public Command
|
||||
{
|
||||
virtual void AddOptions(cmdline::parser &parser) {}
|
||||
|
||||
Reference in New Issue
Block a user