mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-14 02:38:37 +12:00
Qt: multithreaded icon resize
This commit is contained in:
parent
6867fc5f06
commit
5b59c18dcc
6 changed files with 237 additions and 199 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <set>
|
||||
#include <regex>
|
||||
|
||||
#include <QtConcurrent>
|
||||
#include <QDesktopServices>
|
||||
#include <QHeaderView>
|
||||
#include <QMenuBar>
|
||||
|
@ -1601,11 +1602,16 @@ void game_list_frame::RepaintIcons(const bool& fromSettings)
|
|||
}
|
||||
}
|
||||
|
||||
for (auto& game : m_game_data)
|
||||
QList<int> indices;
|
||||
for (int i = 0; i < m_game_data.size(); ++i)
|
||||
indices.append(i);
|
||||
|
||||
QtConcurrent::blockingMap(indices, [this](int& i)
|
||||
{
|
||||
auto game = m_game_data[i];
|
||||
QColor color = getGridCompatibilityColor(game->compat.color);
|
||||
game->pxmap = PaintedPixmap(game->icon, game->hasCustomConfig, game->hasCustomPadConfig, color);
|
||||
}
|
||||
});
|
||||
|
||||
Refresh();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue