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
This commit is contained in:
fires.gc
2008-09-16 12:09:35 +00:00
parent 2ab92c9222
commit ff863e0cec
7 changed files with 103 additions and 5 deletions

View File

@ -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);