mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-25 04:45:00 +00:00
Fix game title sorting (#2286)
* Fix game title sorting * fix * fix * fix
This commit is contained in:
parent
e805b97520
commit
ad5bd91a13
2 changed files with 8 additions and 3 deletions
|
@ -69,7 +69,7 @@ GameListFrame::GameListFrame(std::shared_ptr<GameInfoClass> game_info_get,
|
||||||
ListSortedAsc = true;
|
ListSortedAsc = true;
|
||||||
}
|
}
|
||||||
this->clearContents();
|
this->clearContents();
|
||||||
PopulateGameList();
|
PopulateGameList(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(this, &QTableWidget::customContextMenuRequested, this, [=, this](const QPoint& pos) {
|
connect(this, &QTableWidget::customContextMenuRequested, this, [=, this](const QPoint& pos) {
|
||||||
|
@ -103,7 +103,7 @@ void GameListFrame::PlayBackgroundMusic(QTableWidgetItem* item) {
|
||||||
BackgroundMusicPlayer::getInstance().playMusic(snd0path);
|
BackgroundMusicPlayer::getInstance().playMusic(snd0path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameListFrame::PopulateGameList() {
|
void GameListFrame::PopulateGameList(bool isInitialPopulation) {
|
||||||
// Do not show status column if it is not enabled
|
// Do not show status column if it is not enabled
|
||||||
this->setColumnHidden(2, !Config::getCompatibilityEnabled());
|
this->setColumnHidden(2, !Config::getCompatibilityEnabled());
|
||||||
this->setColumnHidden(6, !Config::GetLoadGameSizeEnabled());
|
this->setColumnHidden(6, !Config::GetLoadGameSizeEnabled());
|
||||||
|
@ -111,6 +111,11 @@ void GameListFrame::PopulateGameList() {
|
||||||
this->setRowCount(m_game_info->m_games.size());
|
this->setRowCount(m_game_info->m_games.size());
|
||||||
ResizeIcons(icon_size);
|
ResizeIcons(icon_size);
|
||||||
|
|
||||||
|
if (isInitialPopulation) {
|
||||||
|
SortNameAscending(1); // Column 1 = Name
|
||||||
|
ResizeIcons(icon_size);
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < m_game_info->m_games.size(); i++) {
|
for (int i = 0; i < m_game_info->m_games.size(); i++) {
|
||||||
SetTableItem(i, 1, QString::fromStdString(m_game_info->m_games[i].name));
|
SetTableItem(i, 1, QString::fromStdString(m_game_info->m_games[i].name));
|
||||||
SetTableItem(i, 3, QString::fromStdString(m_game_info->m_games[i].serial));
|
SetTableItem(i, 3, QString::fromStdString(m_game_info->m_games[i].serial));
|
||||||
|
|
|
@ -46,7 +46,7 @@ private:
|
||||||
bool ListSortedAsc = true;
|
bool ListSortedAsc = true;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void PopulateGameList();
|
void PopulateGameList(bool isInitialPopulation = true);
|
||||||
void ResizeIcons(int iconSize);
|
void ResizeIcons(int iconSize);
|
||||||
|
|
||||||
QImage backgroundImage;
|
QImage backgroundImage;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue