Fix code read
This commit is contained in:
@@ -175,7 +175,7 @@ public:
|
||||
* @returns ResultStatus code, indicating if the operation succeeded.
|
||||
*/
|
||||
[[nodiscard]] ResultStatus Load(Frontend::EmuWindow& emu_window, const std::string& filepath,
|
||||
u64 program_id, std::size_t program_index = 0);
|
||||
u64 program_id = 0, std::size_t program_index = 0);
|
||||
|
||||
/**
|
||||
* Indicates if the emulated system is powered on (all subsystems initialized and able to run an
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
namespace FileSys {
|
||||
|
||||
NSP::NSP(VirtualFile file_, u64 title_id_, std::size_t program_index_)
|
||||
: file(std::move(file_)), expect_program_id(title_id_),
|
||||
: file(std::move(file_)), expected_program_id(title_id_),
|
||||
program_index(program_index_), status{Loader::ResultStatus::Success},
|
||||
pfs(std::make_shared<PartitionFilesystem>(file)), keys{Core::Crypto::KeyManager::Instance()} {
|
||||
if (pfs->GetStatus() != Loader::ResultStatus::Success) {
|
||||
@@ -63,7 +63,7 @@ u64 NSP::GetProgramTitleID() const {
|
||||
return GetExtractedTitleID();
|
||||
}
|
||||
|
||||
auto program_id = expect_program_id;
|
||||
auto program_id = expected_program_id;
|
||||
if (program_id == 0) {
|
||||
if (!program_status.empty()) {
|
||||
program_id = program_status.begin()->first;
|
||||
@@ -99,10 +99,7 @@ std::vector<u64> NSP::GetProgramTitleIDs() const {
|
||||
return {GetExtractedTitleID()};
|
||||
}
|
||||
|
||||
std::vector<u64> out;
|
||||
out.reserve(program_ids.size());
|
||||
for (const auto& title : program_ids)
|
||||
out.push_back(title);
|
||||
std::vector<u64> out{program_ids.cbegin(), program_ids.cend()};
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ private:
|
||||
|
||||
VirtualFile file;
|
||||
|
||||
const u64 expect_program_id;
|
||||
const u64 expected_program_id;
|
||||
const std::size_t program_index;
|
||||
|
||||
bool extracted = false;
|
||||
|
||||
@@ -53,7 +53,7 @@ AppLoader_NSP::AppLoader_NSP(FileSys::VirtualFile file_,
|
||||
AppLoader_NSP::~AppLoader_NSP() = default;
|
||||
|
||||
FileType AppLoader_NSP::IdentifyType(const FileSys::VirtualFile& nsp_file) {
|
||||
const FileSys::NSP nsp(nsp_file, 0, 0);
|
||||
const FileSys::NSP nsp(nsp_file);
|
||||
|
||||
if (nsp.GetStatus() == ResultStatus::Success) {
|
||||
// Extracted Type case
|
||||
|
||||
@@ -44,7 +44,7 @@ AppLoader_XCI::AppLoader_XCI(FileSys::VirtualFile file_,
|
||||
AppLoader_XCI::~AppLoader_XCI() = default;
|
||||
|
||||
FileType AppLoader_XCI::IdentifyType(const FileSys::VirtualFile& xci_file) {
|
||||
const FileSys::XCI xci(xci_file, 0, 0);
|
||||
const FileSys::XCI xci(xci_file);
|
||||
|
||||
if (xci.GetStatus() == ResultStatus::Success &&
|
||||
xci.GetNCAByType(FileSys::NCAContentType::Program) != nullptr &&
|
||||
|
||||
@@ -341,8 +341,8 @@ void GameListWorker::ScanFileSystem(ScanTarget target, const std::string& dir_pa
|
||||
|
||||
if (res2 == Loader::ResultStatus::Success && program_ids.size() > 1 &&
|
||||
(file_type == Loader::FileType::XCI || file_type == Loader::FileType::NSP)) {
|
||||
for (const auto program_id : program_ids) {
|
||||
loader = Loader::GetLoader(system, file, program_id);
|
||||
for (const auto id : program_ids) {
|
||||
loader = Loader::GetLoader(system, file, id);
|
||||
if (!loader) {
|
||||
continue;
|
||||
}
|
||||
@@ -353,12 +353,11 @@ void GameListWorker::ScanFileSystem(ScanTarget target, const std::string& dir_pa
|
||||
std::string name = " ";
|
||||
[[maybe_unused]] const auto res3 = loader->ReadTitle(name);
|
||||
|
||||
const FileSys::PatchManager patch{program_id,
|
||||
system.GetFileSystemController(),
|
||||
const FileSys::PatchManager patch{id, system.GetFileSystemController(),
|
||||
system.GetContentProvider()};
|
||||
|
||||
emit EntryReady(MakeGameListEntry(physical_name, name, icon, *loader,
|
||||
program_id, compatibility_list, patch),
|
||||
emit EntryReady(MakeGameListEntry(physical_name, name, icon, *loader, id,
|
||||
compatibility_list, patch),
|
||||
parent_dir);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -360,7 +360,7 @@ GMainWindow::GMainWindow()
|
||||
}
|
||||
|
||||
if (!game_path.isEmpty()) {
|
||||
BootGame(game_path, 0);
|
||||
BootGame(game_path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user