summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/DiscIO')
-rw-r--r--Source/Core/DiscIO/Src/Blob.cpp10
-rw-r--r--Source/Core/DiscIO/Src/Blob.h2
2 files changed, 8 insertions, 4 deletions
diff --git a/Source/Core/DiscIO/Src/Blob.cpp b/Source/Core/DiscIO/Src/Blob.cpp
index ef198f43d6..35b53e54fd 100644
--- a/Source/Core/DiscIO/Src/Blob.cpp
+++ b/Source/Core/DiscIO/Src/Blob.cpp
@@ -278,7 +278,7 @@ class CompressedBlobReader
offset &= ~(1ULL << 63);
}
- u8* source = mapped_file->Lock(offset, comp_block_size);
+ u8* source = mapped_file->Lock(offset, comp_block_size + 64*1024);
u8* dest = cache[0];
if (uncompressed)
@@ -421,10 +421,14 @@ bool CompressFileToBlob(const char* infile, const char* outfile, u32 sub_type, i
for (u32 i = 0; i < header.num_blocks; i++)
{
- if (i % (header.num_blocks / 100) == 0)
+ if (i % (header.num_blocks / 1000) == 0)
{
u64 inpos = ftell(inf);
- int ratio = (int)(100 * position / inpos);
+ int ratio = 0;
+ if (inpos != 0)
+ {
+ ratio = (int)(100 * position / inpos);
+ }
char temp[512];
sprintf(temp, "%i of %i blocks. compression ratio %i%%", i, header.num_blocks, ratio);
callback(temp, (float)i / (float)header.num_blocks, arg);
diff --git a/Source/Core/DiscIO/Src/Blob.h b/Source/Core/DiscIO/Src/Blob.h
index 5c2ae04259..d8de08d30a 100644
--- a/Source/Core/DiscIO/Src/Blob.h
+++ b/Source/Core/DiscIO/Src/Blob.h
@@ -42,7 +42,7 @@ class IBlobReader
private:
- IBlobReader(const IBlobReader& other) {}
+ IBlobReader(const IBlobReader& /*other*/) {}
};