Merge pull request #9507 from leoetlino/device-prepareforstate

IOS: Remove unnecessary and unused PrepareForState
This commit is contained in:
Léo Lam 2021-02-14 16:30:34 +01:00 committed by GitHub
commit be2cd2272d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 10 deletions

View File

@ -179,8 +179,6 @@ public:
Device(Kernel& ios, const std::string& device_name, DeviceType type = DeviceType::Static); Device(Kernel& ios, const std::string& device_name, DeviceType type = DeviceType::Static);
virtual ~Device() = default; virtual ~Device() = default;
// Release any resources which might interfere with savestating.
virtual void PrepareForState(PointerWrap::Mode mode) {}
virtual void DoState(PointerWrap& p); virtual void DoState(PointerWrap& p);
void DoStateShared(PointerWrap& p); void DoStateShared(PointerWrap& p);

View File

@ -745,14 +745,6 @@ void Kernel::DoState(PointerWrap& p)
if (m_title_id == Titles::MIOS) if (m_title_id == Titles::MIOS)
return; return;
// We need to make sure all file handles are closed so IOS::HLE::FSDevice::DoState can
// successfully save or re-create /tmp
for (auto& descriptor : m_fdmap)
{
if (descriptor)
descriptor->PrepareForState(p.GetMode());
}
for (const auto& entry : m_device_map) for (const auto& entry : m_device_map)
entry.second->DoState(p); entry.second->DoState(p);