summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/Src/CompressedBlob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/DiscIO/Src/CompressedBlob.cpp')
-rw-r--r--Source/Core/DiscIO/Src/CompressedBlob.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/Source/Core/DiscIO/Src/CompressedBlob.cpp b/Source/Core/DiscIO/Src/CompressedBlob.cpp
index f424b2c465..eb340ea216 100644
--- a/Source/Core/DiscIO/Src/CompressedBlob.cpp
+++ b/Source/Core/DiscIO/Src/CompressedBlob.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -26,6 +26,7 @@
#include "Common.h"
#include "CompressedBlob.h"
+#include "DiscScrubber.h"
#include "FileUtil.h"
#include "Hash.h"
@@ -159,17 +160,25 @@ void CompressedBlobReader::GetBlock(u64 block_num, u8 *out_ptr)
bool CompressFileToBlob(const char* infile, const char* outfile, u32 sub_type,
int block_size, CompressCB callback, void* arg)
{
- if (File::GetSize(infile) > 2000000000ULL) {
- PanicAlert("Sorry - compressing Wii games not yet supported.");
- return false;
- }
-
if (IsCompressedBlob(infile))
{
PanicAlert("%s is already compressed! Cannot compress it further.", infile);
return false;
}
+ if (sub_type == 1)
+ {
+ if (PanicYesNo("WARNING - Scrubbing Wii disc %s will permanently remove garbage data.\n"
+ "This should be 100%% OK, but you have the option to opt out.\n\n\n"
+ "Would you like to scrub it?", infile))
+ {
+ if (!DiscScrubber::Scrub(infile, callback, arg))
+ return false;
+ }
+ else
+ return false;
+ }
+
FILE* inf = fopen(infile, "rb");
if (!inf)
return false;