summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2013-02-16 11:10:03 +1100
committerskidau <skidau@gmail.com>2013-02-16 11:10:03 +1100
commit51795d8811a014a9cb0aaac6938ab83effb8797a (patch)
treed12d65a23eec618a50ee11c6af3c0aa30476fc2e /Source/Core/DiscIO
parentf26650e55bf1fc1a59c890008f00a96041b13fa8 (diff)
parent5a3435255be0271023371eb524d8955703a7b503 (diff)
Merge branch 'master' into FIFO-BP
# By Jordan Woyak (24) and others # Via Jordan Woyak (3) and others * master: (66 commits) Reduce some DI command delays. Fix DKCR hanging with DSP HLE. My other games continue to work. Video_Software: Fix ZComploc option breaking stuff. Video_Software: Fix the ZFreeze option doing nothing. Video_Software: Toggable zfreeze and early_z support for testing. Fix header guard and definitions not being set to 1 Add the option to turn on only the EGL interface to use desktop OpenGL with it. Change the ugly "no banner" banner to the sexy "X" from the website. Fix a crash in the FifoPlayer dialog. Use different reply delays for various DI commands. Fixes issue 5983. Revert "[bugfix] DX9::TextureCache: Use max_lod instead of min_lod where necessary." Fix some potential issues when blending on EFB formats without alpha. Clean up state transition tables. Disable play and record buttons if an iso was selected, but is later deselected. Disable start/play recording buttons when no iso is selected. Only delay DI and fs IPC replies. Fixes issue 5982. Fix compilation with SDL2. (based on a patch from matthewharveys) Fixes issue 5971. "Fix" using SDL from externals. Clean up SDL includes a bit. Maybe fix an SDL2 problem. Number "unknown" axes in OSX rather than call them all "unk". Revert "Only delay DI command replies." Fix "Wii Party" again. Hopefully make wiimote speaker less crappy. ...
Diffstat (limited to 'Source/Core/DiscIO')
-rw-r--r--Source/Core/DiscIO/Src/CompressedBlob.cpp2
-rw-r--r--Source/Core/DiscIO/Src/DiscScrubber.cpp6
-rw-r--r--Source/Core/DiscIO/Src/DiscScrubber.h2
-rw-r--r--Source/Core/DiscIO/Src/Volume.h1
-rw-r--r--Source/Core/DiscIO/Src/VolumeGC.cpp7
-rw-r--r--Source/Core/DiscIO/Src/VolumeGC.h1
-rw-r--r--Source/Core/DiscIO/Src/VolumeWad.cpp6
7 files changed, 17 insertions, 8 deletions
diff --git a/Source/Core/DiscIO/Src/CompressedBlob.cpp b/Source/Core/DiscIO/Src/CompressedBlob.cpp
index 48ce8f10f3..c4b1aa1385 100644
--- a/Source/Core/DiscIO/Src/CompressedBlob.cpp
+++ b/Source/Core/DiscIO/Src/CompressedBlob.cpp
@@ -222,7 +222,7 @@ bool CompressFileToBlob(const char* infile, const char* outfile, u32 sub_type,
// u64 size = header.block_size;
std::fill(in_buf, in_buf + header.block_size, 0);
if (scrubbing)
- DiscScrubber::GetNextBlock(inf.GetHandle(), in_buf);
+ DiscScrubber::GetNextBlock(inf, in_buf);
else
inf.ReadBytes(in_buf, header.block_size);
z_stream z;
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++;
diff --git a/Source/Core/DiscIO/Src/DiscScrubber.h b/Source/Core/DiscIO/Src/DiscScrubber.h
index 2b17c7b2f4..d1d053f734 100644
--- a/Source/Core/DiscIO/Src/DiscScrubber.h
+++ b/Source/Core/DiscIO/Src/DiscScrubber.h
@@ -38,7 +38,7 @@ namespace DiscScrubber
{
bool SetupScrub(const char* filename, int block_size);
-void GetNextBlock(FILE* in, u8* buffer);
+void GetNextBlock(File::IOFile& in, u8* buffer);
void Cleanup();
} // namespace DiscScrubber
diff --git a/Source/Core/DiscIO/Src/Volume.h b/Source/Core/DiscIO/Src/Volume.h
index c90ee4a381..557c71c31f 100644
--- a/Source/Core/DiscIO/Src/Volume.h
+++ b/Source/Core/DiscIO/Src/Volume.h
@@ -43,6 +43,7 @@ public:
virtual std::string GetApploaderDate() const = 0;
virtual bool SupportsIntegrityCheck() const { return false; }
virtual bool CheckIntegrity() const { return false; }
+ virtual bool IsDiscTwo() const { return false; }
enum ECountry
{
diff --git a/Source/Core/DiscIO/Src/VolumeGC.cpp b/Source/Core/DiscIO/Src/VolumeGC.cpp
index 51fac285fc..09e2c5eaa9 100644
--- a/Source/Core/DiscIO/Src/VolumeGC.cpp
+++ b/Source/Core/DiscIO/Src/VolumeGC.cpp
@@ -137,4 +137,11 @@ u64 CVolumeGC::GetSize() const
return 0;
}
+bool CVolumeGC::IsDiscTwo() const
+{
+ bool discTwo;
+ Read(6,1, (u8*) &discTwo);
+ return discTwo;
+}
+
} // namespace
diff --git a/Source/Core/DiscIO/Src/VolumeGC.h b/Source/Core/DiscIO/Src/VolumeGC.h
index 5fd18ea96a..4221df9493 100644
--- a/Source/Core/DiscIO/Src/VolumeGC.h
+++ b/Source/Core/DiscIO/Src/VolumeGC.h
@@ -39,6 +39,7 @@ public:
std::string GetApploaderDate() const;
ECountry GetCountry() const;
u64 GetSize() const;
+ bool IsDiscTwo() const;
private:
IBlobReader* m_pReader;
diff --git a/Source/Core/DiscIO/Src/VolumeWad.cpp b/Source/Core/DiscIO/Src/VolumeWad.cpp
index 0cdfc85925..2f9f0ef961 100644
--- a/Source/Core/DiscIO/Src/VolumeWad.cpp
+++ b/Source/Core/DiscIO/Src/VolumeWad.cpp
@@ -129,10 +129,10 @@ bool CVolumeWAD::GetWName(std::vector<std::wstring>& _rwNames) const
_rwNames.push_back(L"");
continue;
}
- for (int i = 0; i < 42; ++i)
+ for (int j = 0; j < 42; ++j)
{
- u16 t = Common::swap16(temp[i]);
- if (t == 0 && i > 0)
+ u16 t = Common::swap16(temp[j]);
+ if (t == 0 && j > 0)
{
if (out_temp.at(out_temp.size()-1) != ' ')
out_temp.push_back(' ');