summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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() {
2751 2751
2752void GMainWindow::UpdateWindowTitle(const std::string& title_name, 2752void GMainWindow::UpdateWindowTitle(const std::string& title_name,
2753 const std::string& title_version) { 2753 const std::string& title_version) {
2754 const auto full_name = std::string(Common::g_build_fullname);
2755 const auto branch_name = std::string(Common::g_scm_branch); 2754 const auto branch_name = std::string(Common::g_scm_branch);
2756 const auto description = std::string(Common::g_scm_desc); 2755 const auto description = std::string(Common::g_scm_desc);
2757 const auto build_id = std::string(Common::g_build_id); 2756 const auto build_id = std::string(Common::g_build_id);
2758 2757
2759 const auto date = 2758 const auto yuzu_title = fmt::format("yuzu | {}-{}", branch_name, description);
2760 QDateTime::currentDateTime().toString(QStringLiteral("yyyy-MM-dd")).toStdString(); 2759 const auto override_title = fmt::format(std::string(Common::g_title_bar_format_idle), build_id);
2760 const auto window_title = override_title.empty() ? yuzu_title : override_title;
2761 2761
2762 if (title_name.empty()) { 2762 if (title_name.empty()) {
2763 const auto fmt = std::string(Common::g_title_bar_format_idle); 2763 setWindowTitle(QString::fromStdString(window_title));
2764 setWindowTitle(QString::fromStdString(fmt::format(fmt.empty() ? "yuzu {0}| {1}-{2}" : fmt,
2765 full_name, branch_name, description,
2766 std::string{}, date, build_id)));
2767 } else { 2764 } else {
2768 const auto fmt = std::string(Common::g_title_bar_format_running); 2765 const auto run_title = fmt::format("{} | {} | {}", window_title, title_name, title_version);
2769 setWindowTitle(QString::fromStdString( 2766 setWindowTitle(QString::fromStdString(run_title));
2770 fmt::format(fmt.empty() ? "yuzu {0}| {3} | {6} | {1}-{2}" : fmt, full_name, branch_name,
2771 description, title_name, date, build_id, title_version)));
2772 } 2767 }
2773} 2768}
2774 2769