Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

main: Don't add an extra separator when the title version is absent

lat9nq0012cb45aeec
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 3c28243626..7eec8f5bbe 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));
}
}