Add git_branch to git-version.h, add display version info to gs_frame and add branch and version to log. (#3186)

* Added version number and branch name to gs_frame and log file. This also involved making the files that generate git-version.h , get the branch.
This commit is contained in:
Peter Mcteague 2017-09-16 12:54:25 +01:00 committed by Ivan
parent 6a54b3929e
commit c18e71ca29
6 changed files with 47 additions and 7 deletions

View file

@ -8,11 +8,28 @@
#include <QTimer>
#include <QThread>
#include <string>
#include "rpcs3_version.h"
#include "git-version.h"
constexpr auto qstr = QString::fromStdString;
gs_frame::gs_frame(const QString& title, int w, int h, QIcon appIcon, bool disableMouse)
: QWindow(), m_windowTitle(title), m_disable_mouse(disableMouse)
{
//Get version by substringing VersionNumber-buildnumber-commithash to get just the part before the dash
std::string version = rpcs3::version.to_string();
version = version.substr(0 , version.find_last_of("-"));
//Add branch to version on frame , unless it's master.
if (rpcs3::get_branch() != "master")
{
version = version + "-" + rpcs3::get_branch();
}
m_windowTitle += qstr(" | " + version);
if (!Emu.GetTitle().empty())
{
m_windowTitle += qstr(" | " + Emu.GetTitle());