mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-14 10:48:36 +12:00
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:
parent
6a54b3929e
commit
c18e71ca29
6 changed files with 47 additions and 7 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue