mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-11 13:13:15 +00:00
Detect and log if the user is using a fork (#2219)
* Added fork detection * Fallback to "origin" if branch is not found * Add fork names to window titles * clang
This commit is contained in:
parent
52df7f6fe5
commit
c77f62a738
5 changed files with 53 additions and 8 deletions
|
@ -57,8 +57,15 @@ bool MainWindow::Init() {
|
|||
if (Common::isRelease) {
|
||||
window_title = fmt::format("shadPS4 v{}", Common::VERSION);
|
||||
} else {
|
||||
window_title = fmt::format("shadPS4 v{} {} {}", Common::VERSION, Common::g_scm_branch,
|
||||
Common::g_scm_desc);
|
||||
std::string remote_url(Common::g_scm_remote_url);
|
||||
if (remote_url == "https://github.com/shadps4-emu/shadPS4.git") {
|
||||
window_title = fmt::format("shadPS4 v{} {} {}", Common::VERSION, Common::g_scm_branch,
|
||||
Common::g_scm_desc);
|
||||
} else {
|
||||
std::string remote_host = remote_url.substr(19, remote_url.rfind('/') - 19);
|
||||
window_title = fmt::format("shadPS4 v{} {}/{} {}", Common::VERSION, remote_host,
|
||||
Common::g_scm_branch, Common::g_scm_desc);
|
||||
}
|
||||
}
|
||||
setWindowTitle(QString::fromStdString(window_title));
|
||||
this->show();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue