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 262b1b4ec5..4e008fadff 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 @@ -83,11 +83,11 @@ CWII_IPC_HLE_Device_es::CWII_IPC_HLE_Device_es(u32 _DeviceID, const std::string& // scan for the title ids listed in TMDs within /title/ m_TitleIDs.clear(); - m_TitleIDs.push_back(0x0000000100000002ULL); - // m_TitleIDs.push_back(0x0001000248414741ULL); - // m_TitleIDs.push_back(0x0001000248414341ULL); - // m_TitleIDs.push_back(0x0001000248414241ULL); - // m_TitleIDs.push_back(0x0001000248414141ULL); + m_TitleIDs.push_back(0x0000000100000002ULL); + //m_TitleIDs.push_back(0x0001000248414741ULL); + //m_TitleIDs.push_back(0x0001000248414341ULL); + //m_TitleIDs.push_back(0x0001000248414241ULL); + //m_TitleIDs.push_back(0x0001000248414141ULL); //FindValidTitleIDs(); @@ -97,13 +97,7 @@ CWII_IPC_HLE_Device_es::CWII_IPC_HLE_Device_es(u32 _DeviceID, const std::string& CWII_IPC_HLE_Device_es::~CWII_IPC_HLE_Device_es() { - CTitleToContentMap::const_iterator itr = m_NANDContent.begin(); - while(itr != m_NANDContent.end()) - { - if (itr->second) - delete itr->second; - itr++; - } + // Leave deletion of the INANDContentLoader objects to CNANDContentManager, don't do it here! m_NANDContent.clear(); } diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp index dd5a25c3ab..d3ac0ddd54 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp @@ -197,7 +197,7 @@ bool CWII_IPC_HLE_Device_fs::IOCtlV(u32 _CommandAddress) Extensions.push_back("*.*"); CFileSearch FileSearch(Extensions, Directories); - + u64 overAllSize = 0; for (size_t i=0; isecond; + if(lb == m_Map.end() || (m_Map.key_comp()(_rName, lb->first))) + m_Map.insert(lb, CNANDContentMap::value_type(_rName, new CNANDContentLoader(_rName))); - m_Map[KeyString] = new CNANDContentLoader(KeyString); - return *m_Map[KeyString]; + return *m_Map[_rName]; } } // namespace end