summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-05-15 22:55:30 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-05-15 22:55:30 +0200
commita3e68dce561a971936014e1091e566f428bcdbbe (patch)
tree8c4ac8105e18ab97e8edfd44efc8084788b1c931
parentMerge pull request #6300 from Morph1984/mbedtls (diff)
downloadyuzu-a3e68dce561a971936014e1091e566f428bcdbbe.tar
yuzu-a3e68dce561a971936014e1091e566f428bcdbbe.tar.gz
yuzu-a3e68dce561a971936014e1091e566f428bcdbbe.tar.bz2
yuzu-a3e68dce561a971936014e1091e566f428bcdbbe.tar.lz
yuzu-a3e68dce561a971936014e1091e566f428bcdbbe.tar.xz
yuzu-a3e68dce561a971936014e1091e566f428bcdbbe.tar.zst
yuzu-a3e68dce561a971936014e1091e566f428bcdbbe.zip
-rw-r--r--src/yuzu/main.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 9e72acbf7..30bb1aac7 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -2751,24 +2751,19 @@ void GMainWindow::MigrateConfigFiles() {
void GMainWindow::UpdateWindowTitle(const std::string& title_name,
const std::string& title_version) {
- const auto full_name = std::string(Common::g_build_fullname);
const auto branch_name = std::string(Common::g_scm_branch);
const auto description = std::string(Common::g_scm_desc);
const auto build_id = std::string(Common::g_build_id);
- const auto date =
- QDateTime::currentDateTime().toString(QStringLiteral("yyyy-MM-dd")).toStdString();
+ const auto yuzu_title = fmt::format("yuzu | {}-{}", branch_name, description);
+ const auto override_title = fmt::format(std::string(Common::g_title_bar_format_idle), build_id);
+ const auto window_title = override_title.empty() ? yuzu_title : override_title;
if (title_name.empty()) {
- const auto fmt = std::string(Common::g_title_bar_format_idle);
- setWindowTitle(QString::fromStdString(fmt::format(fmt.empty() ? "yuzu {0}| {1}-{2}" : fmt,
- full_name, branch_name, description,
- std::string{}, date, build_id)));
+ setWindowTitle(QString::fromStdString(window_title));
} else {
- const auto fmt = std::string(Common::g_title_bar_format_running);
- setWindowTitle(QString::fromStdString(
- fmt::format(fmt.empty() ? "yuzu {0}| {3} | {6} | {1}-{2}" : fmt, full_name, branch_name,
- description, title_name, date, build_id, title_version)));
+ const auto run_title = fmt::format("{} | {} | {}", window_title, title_name, title_version);
+ setWindowTitle(QString::fromStdString(run_title));
}
}