mirror of https://github.com/PCSX2/pcsx2.git
Savestate: Remove unimplemented exceptions.
This commit is contained in:
parent
f9771c38a6
commit
5ab97eb873
|
@ -321,41 +321,3 @@ void memLoadingState::FreezeMem( void* data, int size )
|
||||||
m_idx += size;
|
m_idx += size;
|
||||||
memcpy( data, src, size );
|
memcpy( data, src, size );
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------------------
|
|
||||||
// SaveState Exception Messages
|
|
||||||
// --------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
wxString Exception::UnsupportedStateVersion::FormatDiagnosticMessage() const
|
|
||||||
{
|
|
||||||
// Note: no stacktrace needed for this one...
|
|
||||||
return pxsFmt( L"Unknown or unsupported savestate version: 0x%x", Version );
|
|
||||||
}
|
|
||||||
|
|
||||||
wxString Exception::UnsupportedStateVersion::FormatDisplayMessage() const
|
|
||||||
{
|
|
||||||
// m_message_user contains a recoverable savestate error which is helpful to the user.
|
|
||||||
return
|
|
||||||
m_message_user + L"\n\n" +
|
|
||||||
pxsFmt( _("Cannot load savestate. It is of an unknown or unsupported version."), Version );
|
|
||||||
}
|
|
||||||
|
|
||||||
wxString Exception::StateCrcMismatch::FormatDiagnosticMessage() const
|
|
||||||
{
|
|
||||||
// Note: no stacktrace needed for this one...
|
|
||||||
return pxsFmt(
|
|
||||||
L"Game/CDVD does not match the savestate CRC.\n"
|
|
||||||
L"\tCdvd CRC: 0x%X\n\tGame CRC: 0x%X\n",
|
|
||||||
Crc_Savestate, Crc_Cdvd
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
wxString Exception::StateCrcMismatch::FormatDisplayMessage() const
|
|
||||||
{
|
|
||||||
return
|
|
||||||
m_message_user + L"\n\n" +
|
|
||||||
pxsFmt(
|
|
||||||
L"Savestate game/crc mismatch. Cdvd CRC: 0x%X Game CRC: 0x%X\n",
|
|
||||||
Crc_Savestate, Crc_Cdvd
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
|
@ -30,65 +30,6 @@ static const u32 g_SaveVersion = (0x9A0E << 16) | 0x0000;
|
||||||
// between the GS saving function and the MTGS's needs. :)
|
// between the GS saving function and the MTGS's needs. :)
|
||||||
extern s32 CALLBACK gsSafeFreeze( int mode, freezeData *data );
|
extern s32 CALLBACK gsSafeFreeze( int mode, freezeData *data );
|
||||||
|
|
||||||
|
|
||||||
namespace Exception
|
|
||||||
{
|
|
||||||
// ---------------------------------------------------------------------------------------
|
|
||||||
// Savestate Exceptions:
|
|
||||||
// UnsupportedStateVersion / StateCrcMismatch
|
|
||||||
// ---------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// thrown when the savestate being loaded isn't supported.
|
|
||||||
//
|
|
||||||
class UnsupportedStateVersion : public SaveStateLoadError
|
|
||||||
{
|
|
||||||
DEFINE_EXCEPTION_COPYTORS( UnsupportedStateVersion, SaveStateLoadError )
|
|
||||||
DEFINE_EXCEPTION_MESSAGES( UnsupportedStateVersion )
|
|
||||||
|
|
||||||
public:
|
|
||||||
u32 Version; // version number of the unsupported state.
|
|
||||||
|
|
||||||
protected:
|
|
||||||
UnsupportedStateVersion() {}
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit UnsupportedStateVersion( int version )
|
|
||||||
{
|
|
||||||
Version = version;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual wxString FormatDiagnosticMessage() const;
|
|
||||||
virtual wxString FormatDisplayMessage() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
// A recoverable exception thrown when the CRC of the savestate does not match the
|
|
||||||
// CRC returned by the Cdvd driver.
|
|
||||||
// [feature not implemented yet]
|
|
||||||
//
|
|
||||||
class StateCrcMismatch : public SaveStateLoadError
|
|
||||||
{
|
|
||||||
DEFINE_EXCEPTION_COPYTORS( StateCrcMismatch, SaveStateLoadError )
|
|
||||||
DEFINE_EXCEPTION_MESSAGES( StateCrcMismatch )
|
|
||||||
|
|
||||||
public:
|
|
||||||
u32 Crc_Savestate;
|
|
||||||
u32 Crc_Cdvd;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
StateCrcMismatch() {}
|
|
||||||
|
|
||||||
public:
|
|
||||||
StateCrcMismatch( u32 crc_save, u32 crc_cdvd )
|
|
||||||
{
|
|
||||||
Crc_Savestate = crc_save;
|
|
||||||
Crc_Cdvd = crc_cdvd;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual wxString FormatDiagnosticMessage() const;
|
|
||||||
virtual wxString FormatDisplayMessage() const;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------
|
||||||
// SaveStateBase class
|
// SaveStateBase class
|
||||||
// --------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue