Remove NANDContentManager

This commit is contained in:
Léo Lam
2017-10-01 18:48:50 +02:00
parent c03aa78c8f
commit 346ca009f9
20 changed files with 3 additions and 452 deletions

View File

@ -46,7 +46,6 @@
#include "Core/PowerPC/PowerPC.h"
#include "DiscIO/Enums.h"
#include "DiscIO/NANDContentLoader.h"
#include "DiscIO/Volume.h"
BootParameters::BootParameters(Parameters&& parameters_) : parameters(std::move(parameters_))

View File

@ -20,7 +20,6 @@
#include "Core/IOS/IOS.h"
#include "Core/WiiUtils.h"
#include "DiscIO/NANDContentLoader.h"
#include "DiscIO/WiiWad.h"
bool CBoot::BootNANDTitle(const u64 title_id)

View File

@ -43,7 +43,6 @@
#include "VideoCommon/HiresTextures.h"
#include "DiscIO/Enums.h"
#include "DiscIO/NANDContentLoader.h"
#include "DiscIO/Volume.h"
#include "DiscIO/WiiWad.h"

View File

@ -27,7 +27,6 @@
#include "Core/IOS/ES/Formats.h"
#include "Core/IOS/IOSC.h"
#include "Core/ec_wii.h"
#include "DiscIO/NANDContentLoader.h"
namespace IOS
{
@ -218,11 +217,6 @@ bool ES::LaunchTitle(u64 title_id, bool skip_reload)
NOTICE_LOG(IOS_ES, "Launching title %016" PRIx64 "...", title_id);
// ES_Launch should probably reset the whole state, which at least means closing all open files.
// leaving them open through ES_Launch may cause hangs and other funky behavior
// (supposedly when trying to re-open those files).
DiscIO::NANDContentManager::Access().ClearCache();
u32 device_id;
if (title_id == Titles::SHOP &&
(GetDeviceId(&device_id) != IPC_SUCCESS || device_id == DEFAULT_WII_DEVICE_ID))
@ -401,8 +395,6 @@ ReturnCode ES::Close(u32 fd)
INFO_LOG(IOS_ES, "ES: Close");
m_is_active = false;
// clear the NAND content cache to make sure nothing remains open.
DiscIO::NANDContentManager::Access().ClearCache();
return IPC_SUCCESS;
}
@ -658,9 +650,6 @@ s32 ES::DIVerify(const IOS::ES::TMDReader& tmd, const IOS::ES::TicketReader& tic
if (!tmd_file.WriteBytes(tmd_bytes.data(), tmd_bytes.size()))
ERROR_LOG(IOS_ES, "DIVerify failed to write disc TMD to NAND.");
}
// DI_VERIFY writes to title.tmd, which is read and cached inside the NAND Content Manager.
// clear the cache to avoid content access mismatches.
DiscIO::NANDContentManager::Access().ClearCache();
if (!UpdateUIDAndGID(*GetIOS(), m_title_context.tmd))
{

View File

@ -18,11 +18,6 @@
class PointerWrap;
namespace DiscIO
{
class NANDContentLoader;
}
namespace IOS
{
namespace HLE

View File

@ -12,7 +12,6 @@
#include "Common/MsgHandler.h"
#include "Core/HW/Memmap.h"
#include "Core/IOS/ES/Formats.h"
#include "DiscIO/NANDContentLoader.h"
namespace IOS
{

View File

@ -22,7 +22,6 @@
#include "Core/HW/Memmap.h"
#include "Core/IOS/ES/Formats.h"
#include "Core/ec_wii.h"
#include "DiscIO/NANDContentLoader.h"
namespace IOS
{
@ -506,8 +505,6 @@ ReturnCode ES::DeleteTitle(u64 title_id)
ERROR_LOG(IOS_ES, "DeleteTitle: Failed to delete title directory: %s", title_dir.c_str());
return FS_EACCESS;
}
// XXX: ugly, but until we drop NANDContentManager everywhere, this is going to be needed.
DiscIO::NANDContentManager::Access().ClearCache();
return IPC_SUCCESS;
}

View File

@ -17,7 +17,6 @@
#include "Core/Core.h"
#include "Core/HW/Memmap.h"
#include "Core/IOS/ES/Formats.h"
#include "DiscIO/NANDContentLoader.h"
namespace IOS
{

View File

@ -19,7 +19,6 @@
#include "Core/IOS/ES/ES.h"
#include "Core/IOS/ES/Formats.h"
#include "Core/IOS/WFS/WFSSRV.h"
#include "DiscIO/NANDContentLoader.h"
namespace
{

View File

@ -38,7 +38,6 @@
#include "DiscIO/DiscExtractor.h"
#include "DiscIO/Enums.h"
#include "DiscIO/Filesystem.h"
#include "DiscIO/NANDContentLoader.h"
#include "DiscIO/Volume.h"
#include "DiscIO/VolumeFileBlobReader.h"
#include "DiscIO/VolumeWii.h"
@ -129,10 +128,7 @@ bool InstallWAD(IOS::HLE::Kernel& ios, const DiscIO::WiiWAD& wad)
return false;
}
const bool result = ImportWAD(ios, wad);
DiscIO::NANDContentManager::Access().ClearCache();
return result;
return ImportWAD(ios, wad);
}
bool InstallWAD(const std::string& wad_path)
@ -695,17 +691,13 @@ UpdateResult DiscSystemUpdater::ProcessEntry(u32 type, std::bitset<32> attrs,
UpdateResult DoOnlineUpdate(UpdateCallback update_callback, const std::string& region)
{
OnlineSystemUpdater updater{std::move(update_callback), region};
const UpdateResult result = updater.DoOnlineUpdate();
DiscIO::NANDContentManager::Access().ClearCache();
return result;
return updater.DoOnlineUpdate();
}
UpdateResult DoDiscUpdate(UpdateCallback update_callback, const std::string& image_path)
{
DiscSystemUpdater updater{std::move(update_callback), image_path};
const UpdateResult result = updater.DoDiscUpdate();
DiscIO::NANDContentManager::Access().ClearCache();
return result;
return updater.DoDiscUpdate();
}
NANDCheckResult CheckNAND(IOS::HLE::Kernel& ios)