diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index a00ab968e..15ed297bb 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -671,7 +671,7 @@ void MainWindow::onSystemGameChanged(const QString& path, const QString& game_se s_current_game_path = path; s_current_game_title = game_title; s_current_game_serial = game_serial; - s_current_game_icon = m_game_list_widget->getModel()->getIconForGame(path); + s_current_game_icon = getIconForGame(path); updateWindowTitle(); } @@ -3027,6 +3027,11 @@ void MainWindow::cancelGameListRefresh() m_game_list_widget->cancelRefresh(); } +QIcon MainWindow::getIconForGame(const QString& path) +{ + return m_game_list_widget->getModel()->getIconForGame(path); +} + void MainWindow::runOnUIThread(const std::function& func) { func(); diff --git a/src/duckstation-qt/mainwindow.h b/src/duckstation-qt/mainwindow.h index 78a5c136f..608588c21 100644 --- a/src/duckstation-qt/mainwindow.h +++ b/src/duckstation-qt/mainwindow.h @@ -123,6 +123,7 @@ public: void refreshGameList(bool invalidate_cache); void refreshGameListModel(); void cancelGameListRefresh(); + QIcon getIconForGame(const QString& path); void runOnUIThread(const std::function& func); void requestShutdown(bool allow_confirm, bool allow_save_to_state, bool save_state, bool check_safety, diff --git a/src/duckstation-qt/settingswindow.cpp b/src/duckstation-qt/settingswindow.cpp index c2cefb4ba..14a90371a 100644 --- a/src/duckstation-qt/settingswindow.cpp +++ b/src/duckstation-qt/settingswindow.cpp @@ -57,6 +57,10 @@ SettingsWindow::SettingsWindow(const GameList::Entry* entry, std::unique_ptrhash) { m_ui.setupUi(this); + + if (const QIcon icon = g_main_window->getIconForGame(QString::fromStdString(entry->path)); !icon.isNull()) + setWindowIcon(icon); + setGameTitle(entry->GetDisplayTitle(GameList::ShouldShowLocalizedTitles())); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);