From 1e22b780ae9dac0d1e25cfb0c9521979e6d54a9c Mon Sep 17 00:00:00 2001 From: Riley Hawksworth Date: Sat, 30 Mar 2024 23:26:43 +0000 Subject: [PATCH] Update qt window title to use the long game title rather than short game title. --- src/lime_qt/main.cpp | 11 +++++++---- src/lime_qt/main.h | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lime_qt/main.cpp b/src/lime_qt/main.cpp index ff7200a94..f36d81f00 100644 --- a/src/lime_qt/main.cpp +++ b/src/lime_qt/main.cpp @@ -1238,8 +1238,11 @@ bool GMainWindow::LoadROM(const QString& filename) { } std::string title; + std::string title_long; system.GetAppLoader().ReadTitle(title); + system.GetAppLoader().ReadTitleLong(title_long); game_title = QString::fromStdString(title); + game_title_long = QString::fromStdString(title_long); UpdateWindowTitle(); game_path = filename; @@ -3054,14 +3057,14 @@ void GMainWindow::OnMoviePlaybackCompleted() { void GMainWindow::UpdateWindowTitle() { const QString full_name = QString::fromUtf8(Common::g_build_fullname); - if (game_title.isEmpty()) { + if (game_title_long.isEmpty()) { setWindowTitle(QStringLiteral("Lime %1").arg(full_name)); } else { - setWindowTitle(QStringLiteral("Lime %1 | %2").arg(full_name, game_title)); + setWindowTitle(QStringLiteral("Lime %1 | %2").arg(full_name, game_title_long)); render_window->setWindowTitle( - QStringLiteral("Lime %1 | %2 | %3").arg(full_name, game_title, tr("Primary Window"))); + QStringLiteral("Lime %1 | %2 | %3").arg(full_name, game_title_long, tr("Primary Window"))); secondary_window->setWindowTitle( - QStringLiteral("Lime %1 | %2 | %3").arg(full_name, game_title, tr("Secondary Window"))); + QStringLiteral("Lime %1 | %2 | %3").arg(full_name, game_title_long, tr("Secondary Window"))); } } diff --git a/src/lime_qt/main.h b/src/lime_qt/main.h index c62f4ae06..589c5f5d0 100644 --- a/src/lime_qt/main.h +++ b/src/lime_qt/main.h @@ -321,6 +321,7 @@ private: std::unique_ptr emu_thread; // The title of the game currently running QString game_title; + QString game_title_long; // The path to the game currently running QString game_path;