mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
More robust isolation of the git commit hash, without special cases
This commit is contained in:
@@ -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