Savestate: Remove unimplemented exceptions.

This commit is contained in:
Christian Kenny 2020-05-13 13:30:50 -04:00 committed by Jonathan Li
parent f9771c38a6
commit 5ab97eb873
2 changed files with 0 additions and 97 deletions

View File

@ -321,41 +321,3 @@ void memLoadingState::FreezeMem( void* data, int size )
m_idx += 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
);
}

View File

@ -30,65 +30,6 @@ static const u32 g_SaveVersion = (0x9A0E << 16) | 0x0000;
// between the GS saving function and the MTGS's needs. :)
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
// --------------------------------------------------------------------------------------