diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp index e2967565d0..756b9a592d 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp @@ -77,14 +77,37 @@ CWII_IPC_HLE_Device_es::CWII_IPC_HLE_Device_es(u32 _DeviceID, const std::string& } - // here should be code to scan for the title ids in the NAND - m_TitleIDs.clear(); - /*m_TitleIDs.push_back(0x0000000100000002ULL); - m_TitleIDs.push_back(0x0001000248414741ULL); // TMD Size: 0x8c - m_TitleIDs.push_back(0x0001000248414341ULL); // TMD Size: 0xac -/* m_TitleIDs.push_back(0x0001000248414241ULL); - m_TitleIDs.push_back(0x0001000248414141ULL); */ + // scan for the title ids listed in TMDs within /title/ + m_TitleIDs.clear(); +// std::string titleDir(FULL_WII_USER_DIR + std::string("title")); +// File::FSTEntry parentEntry; +// u32 numEntries = ScanDirectoryTree(titleDir.c_str(), parentEntry); +// +// for(std::vector::iterator level1 = parentEntry.children.begin(); level1 != parentEntry.children.end(); ++level1) +// { +// if (level1->isDirectory) +// { +// for(std::vector::iterator level2 = level1->children.begin(); level2 != level1->children.end(); ++level2) +// { +// if (level2->isDirectory) +// { +// // finally at /title/0011223344/55667788/ +// // ...get titleID from content/title.tmd +// std::string currentTMD(level2->physicalName + DIR_SEP + "content" + DIR_SEP + "title.tmd"); +// if (File::Exists(currentTMD.c_str())) +// { +// FILE *tmd = fopen(currentTMD.c_str(), "rb"); +// u64 titleID = 0xDEADBEEFDEADBEEFULL; +// fseek(tmd, 0x18C, SEEK_SET); +// fread(&titleID, 8, 1, tmd); +// m_TitleIDs.push_back(Common::swap64(titleID)); +// fclose(tmd); +// } +// } +// } +// } +// } INFO_LOG(WII_IPC_ES, "Set default title to %08x/%08x", m_TitleID>>32, m_TitleID); } diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index 1c0892e8c1..17df570de3 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -66,7 +66,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW OpenISO = DiscIO::CreateVolumeFromFilename(fileName); if (DiscIO::IsVolumeWiiDisc(OpenISO)) { - for (u32 i = 0; i < 0xF; i++) + for (u32 i = 0; i < 0xFFFFFFFF; i++) // yes, technically there can be that many partitions... { WiiPartition temp; if ((temp.Partition = DiscIO::CreateVolumeFromFilename(fileName, i)) != NULL)