Rename IsCompressedBlob to IsGCZBlob for clarity
GCZ is just one of the several compressed formats that Dolphin supports.
This commit is contained in:
parent
ce75f55f25
commit
94ee720a07
|
@ -129,7 +129,7 @@ IBlobReader* CreateBlobReader(const std::string& filename)
|
||||||
if (IsWbfsBlob(filename))
|
if (IsWbfsBlob(filename))
|
||||||
return WbfsFileReader::Create(filename);
|
return WbfsFileReader::Create(filename);
|
||||||
|
|
||||||
if (IsCompressedBlob(filename))
|
if (IsGCZBlob(filename))
|
||||||
return CompressedBlobReader::Create(filename);
|
return CompressedBlobReader::Create(filename);
|
||||||
|
|
||||||
if (IsCISOBlob(filename))
|
if (IsCISOBlob(filename))
|
||||||
|
|
|
@ -55,7 +55,7 @@ CompressedBlobReader::CompressedBlobReader(const std::string& filename) : m_file
|
||||||
|
|
||||||
CompressedBlobReader* CompressedBlobReader::Create(const std::string& filename)
|
CompressedBlobReader* CompressedBlobReader::Create(const std::string& filename)
|
||||||
{
|
{
|
||||||
if (IsCompressedBlob(filename))
|
if (IsGCZBlob(filename))
|
||||||
return new CompressedBlobReader(filename);
|
return new CompressedBlobReader(filename);
|
||||||
else
|
else
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
@ -148,7 +148,7 @@ bool CompressFileToBlob(const std::string& infile, const std::string& outfile, u
|
||||||
{
|
{
|
||||||
bool scrubbing = false;
|
bool scrubbing = false;
|
||||||
|
|
||||||
if (IsCompressedBlob(infile))
|
if (IsGCZBlob(infile))
|
||||||
{
|
{
|
||||||
PanicAlertT("\"%s\" is already compressed! Cannot compress it further.", infile.c_str());
|
PanicAlertT("\"%s\" is already compressed! Cannot compress it further.", infile.c_str());
|
||||||
return false;
|
return false;
|
||||||
|
@ -330,7 +330,7 @@ bool CompressFileToBlob(const std::string& infile, const std::string& outfile, u
|
||||||
|
|
||||||
bool DecompressBlobToFile(const std::string& infile, const std::string& outfile, CompressCB callback, void* arg)
|
bool DecompressBlobToFile(const std::string& infile, const std::string& outfile, CompressCB callback, void* arg)
|
||||||
{
|
{
|
||||||
if (!IsCompressedBlob(infile))
|
if (!IsGCZBlob(infile))
|
||||||
{
|
{
|
||||||
PanicAlertT("File not compressed");
|
PanicAlertT("File not compressed");
|
||||||
return false;
|
return false;
|
||||||
|
@ -400,7 +400,7 @@ bool DecompressBlobToFile(const std::string& infile, const std::string& outfile,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsCompressedBlob(const std::string& filename)
|
bool IsGCZBlob(const std::string& filename)
|
||||||
{
|
{
|
||||||
File::IOFile f(filename, "rb");
|
File::IOFile f(filename, "rb");
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
namespace DiscIO
|
namespace DiscIO
|
||||||
{
|
{
|
||||||
|
|
||||||
bool IsCompressedBlob(const std::string& filename);
|
bool IsGCZBlob(const std::string& filename);
|
||||||
|
|
||||||
const u32 kBlobCookie = 0xB10BC001;
|
const u32 kBlobCookie = 0xB10BC001;
|
||||||
|
|
||||||
// A blob file structure:
|
// GCZ file structure:
|
||||||
// BlobHeader
|
// BlobHeader
|
||||||
// u64 offsetsToBlocks[n], top bit specifies whether the block is compressed, or not.
|
// u64 offsetsToBlocks[n], top bit specifies whether the block is compressed, or not.
|
||||||
// compressed data
|
// compressed data
|
||||||
|
|
|
@ -113,7 +113,7 @@ GameFile::GameFile(const QString& fileName)
|
||||||
m_volume_size = volume->GetSize();
|
m_volume_size = volume->GetSize();
|
||||||
|
|
||||||
m_unique_id = QString::fromStdString(volume->GetUniqueID());
|
m_unique_id = QString::fromStdString(volume->GetUniqueID());
|
||||||
m_compressed = DiscIO::IsCompressedBlob(fileName.toStdString());
|
m_compressed = DiscIO::IsGCZBlob(fileName.toStdString());
|
||||||
m_disc_number = volume->GetDiscNumber();
|
m_disc_number = volume->GetDiscNumber();
|
||||||
m_revision = volume->GetRevision();
|
m_revision = volume->GetRevision();
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ GameListItem::GameListItem(const std::string& _rFileName, const std::unordered_m
|
||||||
m_VolumeSize = pVolume->GetSize();
|
m_VolumeSize = pVolume->GetSize();
|
||||||
|
|
||||||
m_UniqueID = pVolume->GetUniqueID();
|
m_UniqueID = pVolume->GetUniqueID();
|
||||||
m_BlobCompressed = DiscIO::IsCompressedBlob(_rFileName);
|
m_BlobCompressed = DiscIO::IsGCZBlob(_rFileName);
|
||||||
m_disc_number = pVolume->GetDiscNumber();
|
m_disc_number = pVolume->GetDiscNumber();
|
||||||
m_Revision = pVolume->GetRevision();
|
m_Revision = pVolume->GetRevision();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue