mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-13 15:49:33 +00:00
More robust isolation of the git commit hash, without special cases
This commit is contained in:
1 parent
248dbfa4a2
commit
c89bcfbb7a
1 file changed
+6
-1
@@ -63,7 +63,12 @@ struct Version
|
||||
static QString string() { return "v" RENDERDOC_VERSION_STRING; }
|
||||
static QString gitCommitHash()
|
||||
{
|
||||
return QString(GIT_COMMIT_HASH).replace("-official", "").replace("-beta", "");
|
||||
QString hash(GIT_COMMIT_HASH);
|
||||
int dash = hash.indexOf(QChar('-'));
|
||||
if(dash < 0)
|
||||
return hash;
|
||||
else
|
||||
return hash.left(dash);
|
||||
}
|
||||
|
||||
static bool isMismatched() { return RENDERDOC_GetVersionString() != bareString(); }
|
||||
|
||||
Reference in new issue
Block a user