Expose function to query git commit hash version info

This commit is contained in:
baldurk
2018-09-25 10:31:09 +01:00
parent 94496e0e2a
commit 7a8581ebab
2 changed files with 14 additions and 0 deletions
+9
View File
@@ -2165,6 +2165,15 @@ This will be in the form "MAJOR.MINOR"
)");
extern "C" RENDERDOC_API const char *RENDERDOC_CC RENDERDOC_GetVersionString();
DOCUMENT(R"(Retrieves the commit hash used to build.
This will be in the form "0123456789abcdef0123456789abcdef01234567"
:return: The commit hash.
:rtype: ``str``
)");
extern "C" RENDERDOC_API const char *RENDERDOC_CC RENDERDOC_GetCommitHash();
DOCUMENT("Internal function for retrieving a config setting.");
extern "C" RENDERDOC_API const char *RENDERDOC_CC RENDERDOC_GetConfigSetting(const char *name);
+5
View File
@@ -175,6 +175,11 @@ extern "C" RENDERDOC_API const char *RENDERDOC_CC RENDERDOC_GetVersionString()
return MAJOR_MINOR_VERSION_STRING;
}
extern "C" RENDERDOC_API const char *RENDERDOC_CC RENDERDOC_GetCommitHash()
{
return GitVersionHash;
}
extern "C" RENDERDOC_API const char *RENDERDOC_CC RENDERDOC_GetConfigSetting(const char *name)
{
return RenderDoc::Inst().GetConfigSetting(name).c_str();