diff options
| author | fires.gc <fires.gc@gmail.com> | 2008-09-16 12:09:35 +0000 |
|---|---|---|
| committer | fires.gc <fires.gc@gmail.com> | 2008-09-16 12:09:35 +0000 |
| commit | ff863e0cec9bcf65deda1f0ce66946d0d0664f8f (patch) | |
| tree | 3a51174b1c9d90610ef977f0dd324d8d575a6b06 /Source/Core/DiscIO/Src/Blob.cpp | |
| parent | 2ab92c9222825dc185e00227596b18da827c746b (diff) | |
added gui support for compressed ISOs...
compression doesn't work and will be fixed (hopefully :D)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@537 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DiscIO/Src/Blob.cpp')
| -rw-r--r-- | Source/Core/DiscIO/Src/Blob.cpp | 10 |
1 files changed, 7 insertions, 3 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);
|
