mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-12 01:14:33 +00:00
Qt: Avoid QPixmap -> QIcon conversion in getIconForGame()
This commit is contained in:
@@ -477,18 +477,9 @@ QIcon GameListModel::getIconForGame(const QString& path)
|
||||
}
|
||||
}
|
||||
|
||||
// See above.
|
||||
const std::string icon_path = GameList::GetGameIconPath(entry->serial, entry->path);
|
||||
if (!icon_path.empty())
|
||||
{
|
||||
QPixmap newpm;
|
||||
if (!icon_path.empty() && newpm.load(QString::fromStdString(icon_path)))
|
||||
{
|
||||
fixIconPixmapSize(newpm);
|
||||
ret = QIcon(*m_memcard_pixmap_cache.Insert(entry->serial, std::move(newpm)));
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
ret = QIcon(QString::fromStdString(icon_path));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user