diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-08-23 14:12:56 -0400 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-08-23 14:12:56 -0400 |
commit | 67fa51ea2f54355bcf49bed36658151e6153bb44 (patch) | |
tree | e066bd93a6d72de7011cabcd096db6ae8bfb8873 /src/yuzu/main.cpp | |
parent | 0dce6d70083d07daa44aebdbf72e1d88e05a63f5 (diff) |
qt: Add filename and title id to window title while running
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index c62360bd4..b3a7bba0c 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -545,6 +545,15 @@ void GMainWindow::BootGame(const QString& filename) { } status_bar_update_timer.start(2000); + std::string title_name; + const auto res = Core::System::GetInstance().GetGameName(title_name); + if (res != Loader::ResultStatus::Success) + title_name = FileUtil::GetFilename(filename.toStdString()); + + setWindowTitle(QString("yuzu %1| %4 | %2-%3") + .arg(Common::g_build_name, Common::g_scm_branch, Common::g_scm_desc, + QString::fromStdString(title_name))); + render_window->show(); render_window->setFocus(); @@ -576,6 +585,8 @@ void GMainWindow::ShutdownGame() { render_window->hide(); game_list->show(); game_list->setFilterFocus(); + setWindowTitle(QString("yuzu %1| %2-%3") + .arg(Common::g_build_name, Common::g_scm_branch, Common::g_scm_desc)); // Disable status bar updates status_bar_update_timer.stop(); |