/[pcsx2_0.9.7]/trunk/pcsx2/gui/SysState.cpp
ViewVC logotype

Diff of /trunk/pcsx2/gui/SysState.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/pcsx2/gui/SysState.cpp	2010/12/23 11:48:33	279
+++ trunk/pcsx2/gui/SysState.cpp	2010/12/23 12:02:12	280
@@ -62,21 +62,6 @@
 			.SetUserMsg(_("Cannot load this savestate. The state is an unsupported version, likely created by a newer edition of PCSX2."));
 };
 
-class gzError : public Exception::BadStream
-{
-	DEFINE_STREAM_EXCEPTION( gzError, BadStream, wxLt("Invalid or corrupted gzip archive") )
-};
-
-class gzReadError : public gzError
-{
-
-};
-
-class gzWriteError : public gzError
-{
-
-};
-
 // --------------------------------------------------------------------------------------
 //  gzipReader
 // --------------------------------------------------------------------------------------
@@ -351,6 +336,15 @@
 {
 	const wxString file( SaveStateBase::GetFilename( num ) );
 
+	// Backup old Savestate if one exists.
+	if( wxFileExists( file ) && EmuConfig.BackupSavestate )
+	{
+		const wxString copy( SaveStateBase::GetFilename( num ) + pxsFmt( L".backup") );
+		
+		Console.Indent().WriteLn( Color_StrongGreen, L"Backing up existing state in slot %d.", num);
+		wxCopyFile( file, copy );
+	}
+
 	Console.WriteLn( Color_StrongGreen, "Saving savestate to slot %d...", num );
 	Console.Indent().WriteLn( Color_StrongGreen, L"filename: %s", file.c_str() );
 

 

  ViewVC Help
Powered by ViewVC 1.1.22