summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-10-03 09:27:08 +0200
committerGitHub <noreply@github.com>2021-10-03 09:27:08 +0200
commite209fff3740a34f0fa9d5ef03d207eb86b401574 (patch)
treecd49095264fbec66ed36c18455718ea994bc8d73 /src
parentMerge pull request #7113 from Morph1984/no-log-ip-addr (diff)
parentmain: Don't add an extra separator when the title version is absent (diff)
downloadyuzu-e209fff3740a34f0fa9d5ef03d207eb86b401574.tar
yuzu-e209fff3740a34f0fa9d5ef03d207eb86b401574.tar.gz
yuzu-e209fff3740a34f0fa9d5ef03d207eb86b401574.tar.bz2
yuzu-e209fff3740a34f0fa9d5ef03d207eb86b401574.tar.lz
yuzu-e209fff3740a34f0fa9d5ef03d207eb86b401574.tar.xz
yuzu-e209fff3740a34f0fa9d5ef03d207eb86b401574.tar.zst
yuzu-e209fff3740a34f0fa9d5ef03d207eb86b401574.zip
Diffstat (limited to 'src')
-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 0bd0c5b04..552c2cc63 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -2920,8 +2920,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));
}
}