From 2d58a2a864d441f0ce9bd519773ee79f9de31322 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Mon, 8 Feb 2010 22:54:16 +0000 Subject: [PATCH] DiscScrubber: er, actually we don't need to store/check for a flag on the original image anymore either. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5033 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DiscIO/Src/DiscScrubber.cpp | 29 ------------------------- Source/Core/DiscIO/Src/DiscScrubber.h | 2 -- 2 files changed, 31 deletions(-) diff --git a/Source/Core/DiscIO/Src/DiscScrubber.cpp b/Source/Core/DiscIO/Src/DiscScrubber.cpp index 3926b4adff..1eb5538f11 100644 --- a/Source/Core/DiscIO/Src/DiscScrubber.cpp +++ b/Source/Core/DiscIO/Src/DiscScrubber.cpp @@ -28,8 +28,6 @@ namespace DiscIO namespace DiscScrubber { -#define SCRUBBER_VERSION 1 - #define CLUSTER_SIZE 0x8000 u8* m_FreeTable = NULL; @@ -89,21 +87,6 @@ bool ParsePartitionData(SPartition& _rPartition); u32 GetDOLSize(u64 _DOLOffset); -// Check for simplistic flag stored in an unencrypted pad space (offset 0x80) -u32 IsScrubbed(const char* filename) -{ - FILE* f = fopen(filename, "rb"); - - if (!f) - return false; - - u32 ScrubbedFlag = SCRUBBER_VERSION; - fseek(f, 0x80, SEEK_SET); - fread(&ScrubbedFlag, sizeof(ScrubbedFlag), 1, f); - fclose(f); - return ScrubbedFlag; -} - bool SetupScrub(const char* filename, int block_size) { bool success = true; @@ -118,18 +101,6 @@ bool SetupScrub(const char* filename, int block_size) m_BlocksPerCluster = CLUSTER_SIZE / m_BlockSize; - u32 version = IsScrubbed(filename); - if (version && version < SCRUBBER_VERSION) - { - if (!PanicYesNo("%s was scrubbed with an older version of DiscScrubber, would you like to re-scrub?", filename)) - return success; - } - else if (version) - { - NOTICE_LOG(DISCIO, "%s is already scrubbed, skipping...", filename); - return success; - } - m_Disc = CreateVolumeFromFilename(filename); m_FileSize = m_Disc->GetSize(); diff --git a/Source/Core/DiscIO/Src/DiscScrubber.h b/Source/Core/DiscIO/Src/DiscScrubber.h index 38b80b3275..2b17c7b2f4 100644 --- a/Source/Core/DiscIO/Src/DiscScrubber.h +++ b/Source/Core/DiscIO/Src/DiscScrubber.h @@ -37,8 +37,6 @@ namespace DiscIO namespace DiscScrubber { -u32 IsScrubbed(const char* filename); - bool SetupScrub(const char* filename, int block_size); void GetNextBlock(FILE* in, u8* buffer); void Cleanup();