summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2021-10-01 00:54:21 +0200
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2021-10-01 00:57:37 +0200
commit596323f89f8b127181cebf65ddf4bbc02792228c (patch)
tree6d7d4e067dd2007cd66aa001a9d3c4d074fa85fc
parentMerge pull request #7061 from ameerj/dma-buffer-misc (diff)
downloadyuzu-596323f89f8b127181cebf65ddf4bbc02792228c.tar
yuzu-596323f89f8b127181cebf65ddf4bbc02792228c.tar.gz
yuzu-596323f89f8b127181cebf65ddf4bbc02792228c.tar.bz2
yuzu-596323f89f8b127181cebf65ddf4bbc02792228c.tar.lz
yuzu-596323f89f8b127181cebf65ddf4bbc02792228c.tar.xz
yuzu-596323f89f8b127181cebf65ddf4bbc02792228c.tar.zst
yuzu-596323f89f8b127181cebf65ddf4bbc02792228c.zip
-rw-r--r--src/yuzu/main.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 3c2824362..7eec8f5bb 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -2913,8 +2913,13 @@ void GMainWindow::UpdateWindowTitle(std::string_view title_name, std::string_vie
if (title_name.empty()) {
setWindowTitle(QString::fromStdString(window_title));
} else {
- const auto run_title =
- fmt::format("{} | {} | {} | {}", window_title, title_name, title_version, gpu_vendor);
+ const auto run_title = [window_title, title_name, title_version, gpu_vendor]() {
+ if (title_version.empty()) {
+ return fmt::format("{} | {} | {}", window_title, title_name, gpu_vendor);
+ }
+ return fmt::format("{} | {} | {} | {}", window_title, title_name, title_version,
+ gpu_vendor);
+ }();
setWindowTitle(QString::fromStdString(run_title));
}
}