mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 14:31:24 +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
|
@ -1,4 +1,4 @@
|
|||
#include "Log.h"
|
||||
#include "Log.h"
|
||||
#include "File.h"
|
||||
#include "StrFmt.h"
|
||||
#include "sema.h"
|
||||
|
@ -7,6 +7,7 @@
|
|||
#include "rpcs3_version.h"
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include "git-version.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define NOMINMAX
|
||||
|
@ -277,7 +278,7 @@ void logs::message::broadcast(const char* fmt, const fmt_type_info* sup, const u
|
|||
g_messages.emplace_back(stored_message{*this, stamp, std::move(prefix), text});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Send message to all listeners
|
||||
while (lis)
|
||||
{
|
||||
|
@ -393,7 +394,8 @@ logs::file_listener::file_listener(const std::string& name)
|
|||
ver.m.ch = nullptr;
|
||||
ver.m.sev = level::always;
|
||||
ver.stamp = 0;
|
||||
ver.text = fmt::format("RPCS3 v%s\n%s", rpcs3::version.to_string(), utils::get_system_info());
|
||||
ver.text = fmt::format("RPCS3 v%s\nBranch: %s\n%s\n", rpcs3::version.to_string(), rpcs3::get_branch(), utils::get_system_info());
|
||||
|
||||
file_writer::log(logs::level::always, ver.text.data(), ver.text.size());
|
||||
file_writer::log(logs::level::always, "\n", 1);
|
||||
g_messages.emplace_back(std::move(ver));
|
||||
|
@ -429,7 +431,7 @@ void logs::file_listener::log(u64 stamp, const logs::message& msg, const std::st
|
|||
text += prefix;
|
||||
text += "} ";
|
||||
}
|
||||
|
||||
|
||||
if (msg.ch && '\0' != *msg.ch->name)
|
||||
{
|
||||
text += msg.ch->name;
|
||||
|
@ -439,7 +441,7 @@ void logs::file_listener::log(u64 stamp, const logs::message& msg, const std::st
|
|||
{
|
||||
text += "TODO: ";
|
||||
}
|
||||
|
||||
|
||||
text += _text;
|
||||
text += '\n';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue