diff options
| author | 2016-04-14 00:04:05 +0300 | |
|---|---|---|
| committer | 2016-05-04 13:02:49 +0300 | |
| commit | 5d5dd66d9222ced82dd61747ef4078fc1eae2496 (patch) | |
| tree | e7495d933b0fbdc767426fc18940f95b7817c8ab /src/citra_qt/game_list.cpp | |
| parent | Merge pull request #1726 from MerryMage/read-write-region (diff) | |
| download | yuzu-5d5dd66d9222ced82dd61747ef4078fc1eae2496.tar.gz yuzu-5d5dd66d9222ced82dd61747ef4078fc1eae2496.tar.xz yuzu-5d5dd66d9222ced82dd61747ef4078fc1eae2496.zip | |
add icon & title to game list
Diffstat (limited to 'src/citra_qt/game_list.cpp')
| -rw-r--r-- | src/citra_qt/game_list.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/citra_qt/game_list.cpp b/src/citra_qt/game_list.cpp index d14532102..32339e6a6 100644 --- a/src/citra_qt/game_list.cpp +++ b/src/citra_qt/game_list.cpp | |||
| @@ -34,8 +34,8 @@ GameList::GameList(QWidget* parent) | |||
| 34 | tree_view->setUniformRowHeights(true); | 34 | tree_view->setUniformRowHeights(true); |
| 35 | 35 | ||
| 36 | item_model->insertColumns(0, COLUMN_COUNT); | 36 | item_model->insertColumns(0, COLUMN_COUNT); |
| 37 | item_model->setHeaderData(COLUMN_FILE_TYPE, Qt::Horizontal, "File type"); | ||
| 38 | item_model->setHeaderData(COLUMN_NAME, Qt::Horizontal, "Name"); | 37 | item_model->setHeaderData(COLUMN_NAME, Qt::Horizontal, "Name"); |
| 38 | item_model->setHeaderData(COLUMN_FILE_TYPE, Qt::Horizontal, "File type"); | ||
| 39 | item_model->setHeaderData(COLUMN_SIZE, Qt::Horizontal, "Size"); | 39 | item_model->setHeaderData(COLUMN_SIZE, Qt::Horizontal, "Size"); |
| 40 | 40 | ||
| 41 | connect(tree_view, SIGNAL(activated(const QModelIndex&)), this, SLOT(ValidateEntry(const QModelIndex&))); | 41 | connect(tree_view, SIGNAL(activated(const QModelIndex&)), this, SLOT(ValidateEntry(const QModelIndex&))); |
| @@ -143,9 +143,15 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, bool d | |||
| 143 | LOG_WARNING(Frontend, "Filetype and extension of file %s do not match.", physical_name.c_str()); | 143 | LOG_WARNING(Frontend, "Filetype and extension of file %s do not match.", physical_name.c_str()); |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | std::vector<u8> smdh; | ||
| 147 | std::unique_ptr<Loader::AppLoader> loader = Loader::GetLoader(FileUtil::IOFile(physical_name, "rb"), filetype, filename_filename, physical_name); | ||
| 148 | |||
| 149 | if (loader) | ||
| 150 | loader->ReadIcon(smdh); | ||
| 151 | |||
| 146 | emit EntryReady({ | 152 | emit EntryReady({ |
| 153 | new GameListItemPath(QString::fromStdString(physical_name), smdh), | ||
| 147 | new GameListItem(QString::fromStdString(Loader::GetFileTypeString(filetype))), | 154 | new GameListItem(QString::fromStdString(Loader::GetFileTypeString(filetype))), |
| 148 | new GameListItemPath(QString::fromStdString(physical_name)), | ||
| 149 | new GameListItemSize(FileUtil::GetSize(physical_name)), | 155 | new GameListItemSize(FileUtil::GetSize(physical_name)), |
| 150 | }); | 156 | }); |
| 151 | } | 157 | } |