Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

[qt] move addons row to rightmost side (#2610)

lizzieecb811ad04e7
diff --git a/src/yuzu/game_list.h b/src/yuzu/game_list.h
index 94e7b2dc42..cd71fb2139 100644
--- a/src/yuzu/game_list.h
+++ b/src/yuzu/game_list.h
@@ -58,11 +58,11 @@ class GameList : public QWidget {
public:
enum {
COLUMN_NAME,
- COLUMN_COMPATIBILITY,
- COLUMN_ADD_ONS,
COLUMN_FILE_TYPE,
COLUMN_SIZE,
COLUMN_PLAY_TIME,
+ COLUMN_ADD_ONS,
+ COLUMN_COMPATIBILITY,
COLUMN_COUNT, // Number of columns
};
diff --git a/src/yuzu/game_list_worker.cpp b/src/yuzu/game_list_worker.cpp
index 538c7ab822..2914c275a8 100644
--- a/src/yuzu/game_list_worker.cpp
+++ b/src/yuzu/game_list_worker.cpp
@@ -204,36 +204,24 @@ QList<QStandardItem*> MakeGameListEntry(const std::string& path,
const PlayTime::PlayTimeManager& play_time_manager,
const FileSys::PatchManager& patch)
{
- const auto it = FindMatchingCompatibilityEntry(compatibility_list, program_id);
-
- // The game list uses this as compatibility number for untested games
- QString compatibility{QStringLiteral("99")};
- if (it != compatibility_list.end()) {
- compatibility = it->second.first;
- }
-
- const auto file_type = loader.GetFileType();
- const auto file_type_string = QString::fromStdString(Loader::GetFileTypeString(file_type));
-
- QList<QStandardItem*> list{
- new GameListItemPath(FormatGameName(path), icon, QString::fromStdString(name),
- file_type_string, program_id),
- new GameListItemCompat(compatibility),
+ auto const it = FindMatchingCompatibilityEntry(compatibility_list, program_id);
+ // The game list uses 99 as compatibility number for untested games
+ QString compatibility = it != compatibility_list.end() ? it->second.first : QStringLiteral("99");
+
+ auto const file_type = loader.GetFileType();
+ auto const file_type_string = QString::fromStdString(Loader::GetFileTypeString(file_type));
+
+ QString patch_versions = GetGameListCachedObject(fmt::format("{:016X}", patch.GetTitleID()), "pv.txt", [&patch, &loader] {
+ return FormatPatchNameVersions(patch, loader, loader.IsRomFSUpdatable());
+ });
+ return QList<QStandardItem*>{
+ new GameListItemPath(FormatGameName(path), icon, QString::fromStdString(name), file_type_string, program_id),
new GameListItem(file_type_string),
new GameListItemSize(size),
new GameListItemPlayTime(play_time_manager.GetPlayTime(program_id)),
+ new GameListItem(patch_versions),
+ new GameListItemCompat(compatibility),
};
-
- QString patch_versions;
-
- patch_versions = GetGameListCachedObject(
- fmt::format("{:016X}", patch.GetTitleID()), "pv.txt", [&patch, &loader] {
- return FormatPatchNameVersions(patch, loader, loader.IsRomFSUpdatable());
- });
-
- list.insert(2, new GameListItem(patch_versions));
-
- return list;
}
} // Anonymous namespace