From 5aaafa6a56101a18759264bbf1ef9293d424f899 Mon Sep 17 00:00:00 2001 From: fearlessTobi Date: Sun, 5 May 2019 03:07:09 +0200 Subject: Separate UserNand and Sdmc directories --- src/yuzu/game_list_worker.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'src/yuzu/game_list_worker.cpp') diff --git a/src/yuzu/game_list_worker.cpp b/src/yuzu/game_list_worker.cpp index e1e69bc1a..c715bcef4 100644 --- a/src/yuzu/game_list_worker.cpp +++ b/src/yuzu/game_list_worker.cpp @@ -240,15 +240,14 @@ void GameListWorker::AddTitlesToGameList(GameListDir* parent_dir) { std::vector> installed_games; installed_games = cache.ListEntriesFilterOrigin(std::nullopt, TitleType::Application, ContentRecordType::Program); - if (parent_dir->type() == static_cast(GameListItemType::InstalledDir)) { + + if (parent_dir->type() == static_cast(GameListItemType::SdmcDir)) { installed_games = cache.ListEntriesFilterOrigin( - ContentProviderUnionSlot::UserNAND, TitleType::Application, ContentRecordType::Program); - auto installed_sdmc_games = cache.ListEntriesFilterOrigin( ContentProviderUnionSlot::SDMC, TitleType::Application, ContentRecordType::Program); - - installed_games.insert(installed_games.end(), installed_sdmc_games.begin(), - installed_sdmc_games.end()); - } else if (parent_dir->type() == static_cast(GameListItemType::SystemDir)) { + } else if (parent_dir->type() == static_cast(GameListItemType::UserNandDir)) { + installed_games = cache.ListEntriesFilterOrigin( + ContentProviderUnionSlot::UserNAND, TitleType::Application, ContentRecordType::Program); + } else if (parent_dir->type() == static_cast(GameListItemType::SysNandDir)) { installed_games = cache.ListEntriesFilterOrigin( ContentProviderUnionSlot::SysNAND, TitleType::Application, ContentRecordType::Program); } @@ -353,12 +352,16 @@ void GameListWorker::run() { stop_processing = false; for (UISettings::GameDir& game_dir : game_dirs) { - if (game_dir.path == "INSTALLED") { - auto* const game_list_dir = new GameListDir(game_dir, GameListItemType::InstalledDir); + if (game_dir.path == QStringLiteral("SDMC")) { + auto* const game_list_dir = new GameListDir(game_dir, GameListItemType::SdmcDir); + emit DirEntryReady({game_list_dir}); + AddTitlesToGameList(game_list_dir); + } else if (game_dir.path == QStringLiteral("UserNAND")) { + auto* const game_list_dir = new GameListDir(game_dir, GameListItemType::UserNandDir); emit DirEntryReady({game_list_dir}); AddTitlesToGameList(game_list_dir); - } else if (game_dir.path == "SYSTEM") { - auto* const game_list_dir = new GameListDir(game_dir, GameListItemType::SystemDir); + } else if (game_dir.path == QStringLiteral("SysNAND")) { + auto* const game_list_dir = new GameListDir(game_dir, GameListItemType::SysNandDir); emit DirEntryReady({game_list_dir}); AddTitlesToGameList(game_list_dir); } else { -- cgit v1.2.3