diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-06-28 14:51:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-28 14:51:49 -0400 |
commit | ec68cba44032c4ea1ef3d1de4aecaefc693f4a12 (patch) | |
tree | 48fcef18920efbfedd88fe7d79cd7bbbbcce56d8 /src/yuzu/main.cpp | |
parent | c5e25cffb9f561394a6b30c1b30a327404fa1545 (diff) | |
parent | a01459df3d48e6d4b5d8e7205a8e56b855d0606e (diff) |
Merge pull request #6502 from ameerj/vendor-title
main: Add GPU Vendor name to running title bar
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 20f65d233..7063327e8 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -104,6 +104,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual #include "input_common/main.h" #include "util/overlay_dialog.h" #include "video_core/gpu.h" +#include "video_core/renderer_base.h" #include "video_core/shader_notify.h" #include "yuzu/about_dialog.h" #include "yuzu/bootmanager.h" @@ -1426,7 +1427,8 @@ void GMainWindow::BootGame(const QString& filename, std::size_t program_index, S const auto instruction_set_suffix = is_64bit ? " (64-bit)" : " (32-bit)"; title_name += instruction_set_suffix; LOG_INFO(Frontend, "Booting game: {:016X} | {} | {}", title_id, title_name, title_version); - UpdateWindowTitle(title_name, title_version); + const auto gpu_vendor = system.GPU().Renderer().GetDeviceVendor(); + UpdateWindowTitle(title_name, title_version, gpu_vendor); loading_screen->Prepare(system.GetAppLoader()); loading_screen->show(); @@ -2855,8 +2857,8 @@ void GMainWindow::MigrateConfigFiles() { } } -void GMainWindow::UpdateWindowTitle(const std::string& title_name, - const std::string& title_version) { +void GMainWindow::UpdateWindowTitle(std::string_view title_name, std::string_view title_version, + std::string_view gpu_vendor) { const auto branch_name = std::string(Common::g_scm_branch); const auto description = std::string(Common::g_scm_desc); const auto build_id = std::string(Common::g_build_id); @@ -2869,7 +2871,8 @@ void GMainWindow::UpdateWindowTitle(const std::string& title_name, if (title_name.empty()) { setWindowTitle(QString::fromStdString(window_title)); } else { - const auto run_title = fmt::format("{} | {} | {}", window_title, title_name, title_version); + const auto run_title = + fmt::format("{} | {} | {} | {}", window_title, title_name, title_version, gpu_vendor); setWindowTitle(QString::fromStdString(run_title)); } } |