summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO
diff options
context:
space:
mode:
authorGlenn Rice <glennricster@gmail.com>2011-07-18 01:47:55 +0000
committerGlenn Rice <glennricster@gmail.com>2011-07-18 01:47:55 +0000
commit7135dba54ef70331f5e8a1903033ab5b602bc671 (patch)
tree26b2b00aeb040a2bb193e253c1a713c2258ccb6c /Source/Core/DiscIO
parent82b635b7990cf61f2436224afaaa8072ef4c61b6 (diff)
Add the DSPTool and UnitTests to the cmake build. They are optional, and to enable them add -DDSTPTOOL and -DUNITTESTS to the cmake command line.
Also, don't check to see if a directory is a wad file. They aren't. This removes an annoying and invalid debug assertion with the debug build. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7682 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DiscIO')
-rw-r--r--Source/Core/DiscIO/Src/NANDContentLoader.cpp10
-rw-r--r--Source/Core/DiscIO/Src/WiiWad.cpp2
2 files changed, 4 insertions, 8 deletions
diff --git a/Source/Core/DiscIO/Src/NANDContentLoader.cpp b/Source/Core/DiscIO/Src/NANDContentLoader.cpp
index ff8be03f89..c8e409636b 100644
--- a/Source/Core/DiscIO/Src/NANDContentLoader.cpp
+++ b/Source/Core/DiscIO/Src/NANDContentLoader.cpp
@@ -212,14 +212,12 @@ bool CNANDContentLoader::Initialize(const std::string& _rName)
else
{
std::string TMDFileName(m_Path);
+
if (File::IsDirectory(TMDFileName))
- {
TMDFileName += "title.tmd";
- }
else
- {
m_Path = TMDFileName.substr(0, TMDFileName.find("title.tmd"));
- }
+
File::IOFile pTMDFile(TMDFileName, "rb");
if (!pTMDFile)
{
@@ -282,9 +280,7 @@ bool CNANDContentLoader::Initialize(const std::string& _rName)
strcpy(szFilename, Filename.c_str());
}
else
- {
sprintf(szFilename, "%s/%08x.app", m_Path.c_str(), rContent.m_ContentID);
- }
INFO_LOG(DISCIO, "NANDContentLoader: load %s", szFilename);
@@ -294,7 +290,7 @@ bool CNANDContentLoader::Initialize(const std::string& _rName)
const u64 ContentSize = File::GetSize(szFilename);
rContent.m_pData = new u8[(u32)ContentSize];
- _dbg_assert_msg_(BOOT, rContent.m_Size==ContentSize, "TMDLoader: Filesize doesnt fit (%s %i)... prolly you have a bad dump", szFilename, i);
+ _dbg_assert_msg_(BOOT, rContent.m_Size==ContentSize, "TMDLoader: Incorrect filesize (%s %i). Your NAND dump may be corrupt.", szFilename, i);
pFile.ReadBytes(rContent.m_pData, (size_t)ContentSize);
}
diff --git a/Source/Core/DiscIO/Src/WiiWad.cpp b/Source/Core/DiscIO/Src/WiiWad.cpp
index 64d8f5eced..24e091f9f4 100644
--- a/Source/Core/DiscIO/Src/WiiWad.cpp
+++ b/Source/Core/DiscIO/Src/WiiWad.cpp
@@ -46,7 +46,7 @@ private:
WiiWAD::WiiWAD(const std::string& _rName)
{
DiscIO::IBlobReader* pReader = DiscIO::CreateBlobReader(_rName.c_str());
- if (pReader == NULL)
+ if (pReader == NULL || File::IsDirectory(_rName))
{
m_Valid = false;
return;