diff options
| author | Glenn Rice <glennricster@gmail.com> | 2013-02-02 08:17:44 -0600 |
|---|---|---|
| committer | Glenn Rice <glennricster@gmail.com> | 2013-02-02 08:17:44 -0600 |
| commit | b13b5949054444bcce998a57784f53343a452121 (patch) | |
| tree | e6dc0db4533630a7d65cbe845a6266896b0533d2 /Source/Core/DiscIO/Src/DiscScrubber.cpp | |
| parent | c8c75dc9a3a9746989dc345838a0f04299154fc8 (diff) | |
| parent | f7fa33f2d618206e6388cc023d17ceb6a04d6af2 (diff) | |
Merge branch 'compiler-warnings'
This shouldn't break anything so I will go ahead and merge it. Disc scrubbing is tested and works. There is a minor change to how the data is read by using the File::IOFile::ReadBytes method instead of directly using fread, but the data read is the same.
Diffstat (limited to 'Source/Core/DiscIO/Src/DiscScrubber.cpp')
| -rw-r--r-- | Source/Core/DiscIO/Src/DiscScrubber.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/DiscIO/Src/DiscScrubber.cpp b/Source/Core/DiscIO/Src/DiscScrubber.cpp index 841c8283cc..9ea4a1911d 100644 --- a/Source/Core/DiscIO/Src/DiscScrubber.cpp +++ b/Source/Core/DiscIO/Src/DiscScrubber.cpp @@ -127,7 +127,7 @@ bool SetupScrub(const char* filename, int block_size) return success; } -void GetNextBlock(FILE* in, u8* buffer) +void GetNextBlock(File::IOFile& in, u8* buffer) { u64 CurrentOffset = m_BlockCount * m_BlockSize; u64 i = CurrentOffset / CLUSTER_SIZE; @@ -136,12 +136,12 @@ void GetNextBlock(FILE* in, u8* buffer) { DEBUG_LOG(DISCIO, "Freeing 0x%016llx", CurrentOffset); std::fill(buffer, buffer + m_BlockSize, 0xFF); - fseeko(in, m_BlockSize, SEEK_CUR); + in.Seek(m_BlockSize, SEEK_CUR); } else { DEBUG_LOG(DISCIO, "Used 0x%016llx", CurrentOffset); - fread(buffer, m_BlockSize, 1, in); + in.ReadBytes(buffer, m_BlockSize); } m_BlockCount++; |
