DiscIO: Allow converting from formats other than ISO and GCZ

The constant DESIRED_BUFFER_SIZE was determined by multiplying the
old hardcoded value 32 with the default GCZ block size 16 KiB.
Not sure if it actually is the best value, but it seems fine.
This commit is contained in:
JosJuice
2020-04-04 20:56:20 +02:00
parent 0a71dda8a0
commit 8a9597e32e
10 changed files with 80 additions and 96 deletions

View File

@ -595,8 +595,8 @@ void GameList::CompressISO(bool decompress)
}
good = std::async(std::launch::async, [&] {
const bool good = DiscIO::DecompressBlobToFile(original_path, dst_path.toStdString(),
&CompressCB, &progress_dialog);
const bool good = DiscIO::ConvertToPlain(original_path, dst_path.toStdString(), &CompressCB,
&progress_dialog);
progress_dialog.Reset();
return good;
});
@ -612,9 +612,9 @@ void GameList::CompressISO(bool decompress)
good = std::async(std::launch::async, [&] {
const bool good =
DiscIO::CompressFileToBlob(original_path, dst_path.toStdString(),
file->GetPlatform() == DiscIO::Platform::WiiDisc ? 1 : 0,
16384, &CompressCB, &progress_dialog);
DiscIO::ConvertToGCZ(original_path, dst_path.toStdString(),
file->GetPlatform() == DiscIO::Platform::WiiDisc ? 1 : 0, 16384,
&CompressCB, &progress_dialog);
progress_dialog.Reset();
return good;
});