diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/file_sys/vfs.h | 2 | ||||
| -rw-r--r-- | src/yuzu/game_list.cpp | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/core/file_sys/vfs.h b/src/core/file_sys/vfs.h index 9c7ef93b8..bf16e7286 100644 --- a/src/core/file_sys/vfs.h +++ b/src/core/file_sys/vfs.h | |||
| @@ -31,7 +31,7 @@ enum class VfsEntryType { | |||
| 31 | Directory, | 31 | Directory, |
| 32 | }; | 32 | }; |
| 33 | 33 | ||
| 34 | // A class represnting an abstract filesystem. A default implementation given the root VirtualDir is | 34 | // A class representing an abstract filesystem. A default implementation given the root VirtualDir is |
| 35 | // provided for convenience, but if the Vfs implementation has any additional state or | 35 | // provided for convenience, but if the Vfs implementation has any additional state or |
| 36 | // functionality, they will need to override. | 36 | // functionality, they will need to override. |
| 37 | struct VfsFilesystem : NonCopyable { | 37 | struct VfsFilesystem : NonCopyable { |
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index e150a0684..1c738d2a4 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include "common/string_util.h" | 15 | #include "common/string_util.h" |
| 16 | #include "core/file_sys/content_archive.h" | 16 | #include "core/file_sys/content_archive.h" |
| 17 | #include "core/file_sys/control_metadata.h" | 17 | #include "core/file_sys/control_metadata.h" |
| 18 | #include "core/file_sys/romfs.h" | ||
| 18 | #include "core/file_sys/vfs_real.h" | 19 | #include "core/file_sys/vfs_real.h" |
| 19 | #include "core/loader/loader.h" | 20 | #include "core/loader/loader.h" |
| 20 | #include "game_list.h" | 21 | #include "game_list.h" |
| @@ -415,8 +416,8 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, unsign | |||
| 415 | bool is_dir = FileUtil::IsDirectory(physical_name); | 416 | bool is_dir = FileUtil::IsDirectory(physical_name); |
| 416 | QFileInfo file_info(physical_name.c_str()); | 417 | QFileInfo file_info(physical_name.c_str()); |
| 417 | if (!is_dir && file_info.suffix().toStdString() == "nca") { | 418 | if (!is_dir && file_info.suffix().toStdString() == "nca") { |
| 418 | auto nca = std::make_shared<FileSys::NCA>( | 419 | auto nca = |
| 419 | std::make_shared<FileSys::RealVfsFile>(physical_name)); | 420 | std::make_shared<FileSys::NCA>(vfs->OpenFile(physical_name, FileSys::Mode::Read)); |
| 420 | if (nca->GetType() == FileSys::NCAContentType::Control) | 421 | if (nca->GetType() == FileSys::NCAContentType::Control) |
| 421 | nca_control_map.insert_or_assign(nca->GetTitleId(), nca); | 422 | nca_control_map.insert_or_assign(nca->GetTitleId(), nca); |
| 422 | } | 423 | } |
| @@ -460,7 +461,7 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, unsign | |||
| 460 | // Use from metadata pool. | 461 | // Use from metadata pool. |
| 461 | if (nca_control_map.find(program_id) != nca_control_map.end()) { | 462 | if (nca_control_map.find(program_id) != nca_control_map.end()) { |
| 462 | const auto nca = nca_control_map[program_id]; | 463 | const auto nca = nca_control_map[program_id]; |
| 463 | const auto control_dir = nca->GetSubdirectories()[0]; | 464 | const auto control_dir = FileSys::ExtractRomFS(nca->GetRomFS()); |
| 464 | 465 | ||
| 465 | const auto nacp_file = control_dir->GetFile("control.nacp"); | 466 | const auto nacp_file = control_dir->GetFile("control.nacp"); |
| 466 | FileSys::NACP nacp(nacp_file); | 467 | FileSys::NACP nacp(nacp_file); |