mirror of https://github.com/PCSX2/pcsx2.git
savestate: remove a bunch of dead code
This commit is contained in:
parent
a781b4529b
commit
18bc19a09c
|
@ -24,6 +24,7 @@
|
|||
#include "GSLzma.h"
|
||||
|
||||
#include "AppCoreThread.h"
|
||||
#include "Utilities/pxStreams.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
|
@ -2309,7 +2310,7 @@ GSRendererType GSApp::GetCurrentRendererType() const
|
|||
|
||||
void GSDoFreezeOut(void* dest)
|
||||
{
|
||||
freezeData fP = {0, (s8*)dest};
|
||||
GSFreezeData fP = {0, (u8*)dest};
|
||||
if (GSfreeze(FREEZE_SIZE, &fP) != 0)
|
||||
return;
|
||||
if (!fP.size)
|
||||
|
@ -2324,7 +2325,7 @@ void GSDoFreezeOut(void* dest)
|
|||
|
||||
void GSDoFreezeIn(pxInputStream& infp)
|
||||
{
|
||||
freezeData fP = {0, nullptr};
|
||||
GSFreezeData fP = {0, nullptr};
|
||||
if (GSfreeze(FREEZE_SIZE, &fP) != 0)
|
||||
fP.size = 0;
|
||||
|
||||
|
@ -2346,7 +2347,7 @@ void GSDoFreezeIn(pxInputStream& infp)
|
|||
}
|
||||
|
||||
ScopedAlloc<s8> data(fP.size);
|
||||
fP.data = data.GetPtr();
|
||||
fP.data = (u8*)data.GetPtr();
|
||||
|
||||
infp.Read(fP.data, fP.size);
|
||||
if (GSfreeze(FREEZE_LOAD, &fP) != 0)
|
||||
|
|
|
@ -241,16 +241,6 @@ SaveStateBase& SaveStateBase::FreezeInternals()
|
|||
return *this;
|
||||
}
|
||||
|
||||
SaveStateBase& SaveStateBase::FreezeAll()
|
||||
{
|
||||
FreezeMainMemory();
|
||||
FreezeBios();
|
||||
FreezeInternals();
|
||||
//TODO: ADD BACK FREEZE PLUGINS HERE
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// memSavingState (implementations)
|
||||
|
@ -285,14 +275,6 @@ void memSavingState::MakeRoomForData()
|
|||
m_memory->MakeRoomFor( m_idx + MemoryBaseAllocSize );
|
||||
}
|
||||
|
||||
// Saving of state data to a memory buffer
|
||||
memSavingState& memSavingState::FreezeAll()
|
||||
{
|
||||
MakeRoomForData();
|
||||
_parent::FreezeAll();
|
||||
return *this;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// memLoadingState (implementations)
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
|
|
@ -76,11 +76,6 @@ public:
|
|||
return (m_version & 0xffff);
|
||||
}
|
||||
|
||||
// Loads or saves the entire emulation state.
|
||||
// Note: The Cpu state must be reset, and plugins *open*, prior to Defrosting
|
||||
// (loading) a state!
|
||||
virtual SaveStateBase& FreezeAll();
|
||||
|
||||
virtual SaveStateBase& FreezeMainMemory();
|
||||
virtual SaveStateBase& FreezeBios();
|
||||
virtual SaveStateBase& FreezeInternals();
|
||||
|
@ -197,7 +192,6 @@ public:
|
|||
void MakeRoomForData();
|
||||
|
||||
void FreezeMem( void* data, int size );
|
||||
memSavingState& FreezeAll();
|
||||
|
||||
bool IsSaving() const { return true; }
|
||||
};
|
||||
|
|
|
@ -181,16 +181,6 @@ void SysCoreThread::ApplySettings(const Pcsx2Config& src)
|
|||
const_cast<Pcsx2Config&>(EmuConfig) = src;
|
||||
}
|
||||
|
||||
void SysCoreThread::UploadStateCopy(const VmStateBuffer& copy)
|
||||
{
|
||||
if (!pxAssertDev(IsPaused(), "CoreThread is not paused; new VM state cannot be uploaded."))
|
||||
return;
|
||||
|
||||
memLoadingState loadme(copy);
|
||||
loadme.FreezeAll();
|
||||
m_resetVirtualMachine = false;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// SysCoreThread *Worker* Implementations
|
||||
// (Called from the context of this thread only)
|
||||
|
|
|
@ -209,7 +209,6 @@ public:
|
|||
virtual void GameStartingInThread();
|
||||
|
||||
virtual void ApplySettings(const Pcsx2Config& src);
|
||||
virtual void UploadStateCopy(const VmStateBuffer& copy);
|
||||
|
||||
virtual bool HasActiveMachine() const { return m_hasActiveMachine; }
|
||||
|
||||
|
|
|
@ -642,13 +642,6 @@ bool AppCoreThread::StateCheckInThread()
|
|||
return _parent::StateCheckInThread();
|
||||
}
|
||||
|
||||
void AppCoreThread::UploadStateCopy(const VmStateBuffer& copy)
|
||||
{
|
||||
ScopedCoreThreadPause paused_core;
|
||||
_parent::UploadStateCopy(copy);
|
||||
paused_core.AllowResume();
|
||||
}
|
||||
|
||||
static uint m_except_threshold = 0;
|
||||
|
||||
void AppCoreThread::ExecuteTaskInThread()
|
||||
|
|
|
@ -151,7 +151,6 @@ public:
|
|||
virtual void ChangeCdvdSource();
|
||||
|
||||
virtual void ApplySettings(const Pcsx2Config& src);
|
||||
virtual void UploadStateCopy(const VmStateBuffer& copy);
|
||||
|
||||
protected:
|
||||
virtual void DoCpuExecute();
|
||||
|
|
|
@ -400,7 +400,7 @@ namespace Implementations
|
|||
return;
|
||||
if (renderswitch_delay == 0)
|
||||
{
|
||||
ScopedCoreThreadPause paused_core();
|
||||
ScopedCoreThreadPause paused_core;
|
||||
// TODO: add back saving/freezing of gs here -- govanify
|
||||
renderswitch = !renderswitch;
|
||||
paused_core.AllowResume();
|
||||
|
|
|
@ -279,7 +279,7 @@ public:
|
|||
void FreezeIn(pxInputStream& reader) const { return GSDoFreezeIn(reader); }
|
||||
void FreezeOut(SaveStateBase& writer) const
|
||||
{
|
||||
freezeData fP = {0, NULL};
|
||||
GSFreezeData fP = {0, NULL};
|
||||
if (GSfreeze(FREEZE_SIZE, &fP) == 0)
|
||||
{
|
||||
const int size = fP.size;
|
||||
|
|
Loading…
Reference in New Issue