diff options
author | fearlessTobi <thm.frey@gmail.com> | 2019-05-05 03:07:09 +0200 |
---|---|---|
committer | FearlessTobi <thm.frey@gmail.com> | 2019-09-04 16:47:32 +0200 |
commit | 5aaafa6a56101a18759264bbf1ef9293d424f899 (patch) | |
tree | a003ef0c8b3af5821b2f1c28ff24e99b444b9e40 /src/yuzu/game_list.cpp | |
parent | dfec9c9a437b7478abd8b280f6ce513da595ba73 (diff) |
Separate UserNand and Sdmc directories
Diffstat (limited to 'src/yuzu/game_list.cpp')
-rw-r--r-- | src/yuzu/game_list.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index 51ced635b..cab982385 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp @@ -161,8 +161,8 @@ static bool ContainsAllWords(const QString& haystack, const QString& userinput) // Syncs the expanded state of Game Directories with settings to persist across sessions void GameList::onItemExpanded(const QModelIndex& item) { const auto type = item.data(GameListItem::TypeRole).value<GameListItemType>(); - if (type == GameListItemType::CustomDir || type == GameListItemType::InstalledDir || - type == GameListItemType::SystemDir) + if (type == GameListItemType::CustomDir || type == GameListItemType::SdmcDir || + type == GameListItemType::UserNandDir || type == GameListItemType::SysNandDir) item.data(GameListDir::GameDirRole).value<UISettings::GameDir*>()->expanded = tree_view->isExpanded(item); } @@ -232,14 +232,21 @@ void GameList::onUpdateThemedIcons() { const int icon_size = UISettings::values.icon_size; switch (child->data(GameListItem::TypeRole).value<GameListItemType>()) { - case GameListItemType::InstalledDir: + case GameListItemType::SdmcDir: child->setData( QIcon::fromTheme(QStringLiteral("sd_card")) .pixmap(icon_size) .scaled(icon_size, icon_size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation), Qt::DecorationRole); break; - case GameListItemType::SystemDir: + case GameListItemType::UserNandDir: + child->setData( + QIcon::fromTheme(QStringLiteral("chip")) + .pixmap(icon_size) + .scaled(icon_size, icon_size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation), + Qt::DecorationRole); + break; + case GameListItemType::SysNandDir: child->setData( QIcon::fromTheme(QStringLiteral("chip")) .pixmap(icon_size) @@ -394,7 +401,8 @@ bool GameList::isEmpty() const { const QStandardItem* child = item_model->invisibleRootItem()->child(i); const auto type = static_cast<GameListItemType>(child->type()); if (!child->hasChildren() && - (type == GameListItemType::InstalledDir || type == GameListItemType::SystemDir)) { + (type == GameListItemType::SdmcDir || type == GameListItemType::UserNandDir || + type == GameListItemType::SysNandDir)) { item_model->invisibleRootItem()->removeRow(child->row()); i--; }; @@ -450,8 +458,9 @@ void GameList::PopupContextMenu(const QPoint& menu_location) { AddPermDirPopup(context_menu, selected); AddCustomDirPopup(context_menu, selected); break; - case GameListItemType::InstalledDir: - case GameListItemType::SystemDir: + case GameListItemType::SdmcDir: + case GameListItemType::UserNandDir: + case GameListItemType::SysNandDir: AddPermDirPopup(context_menu, selected); break; } |