Fix bug in multitap memorycard filenames (all multitap cards on each port pointed to the same file, woops!), and fix some NTFS redundant re-compression silliness during startup when using very large memorycards.

Note: For the multitap to work, you'll need to remove the existing multitap filenames in your pcsx2.ini (or delete the ini completely).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3087 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2010-05-27 00:42:38 +00:00
parent d75664e1b2
commit d3c98dd02a
5 changed files with 7 additions and 6 deletions

View File

@ -437,9 +437,9 @@ void AppConfig::LoadSaveMemcards( IniInterface& ini )
int mtport = FileMcd_GetMtapPort(slot)+1; int mtport = FileMcd_GetMtapPort(slot)+1;
int mtslot = FileMcd_GetMtapSlot(slot)+1; int mtslot = FileMcd_GetMtapSlot(slot)+1;
ini.Entry( wxsFormat( L"Multitap%u_Slot%d_Enable", mtport, mtslot ), ini.Entry( wxsFormat( L"Multitap%u_Slot%u_Enable", mtport, mtslot ),
Mcd[slot].Enabled, defaults.Mcd[slot].Enabled ); Mcd[slot].Enabled, defaults.Mcd[slot].Enabled );
ini.Entry( wxsFormat( L"Multitap%u_Slot%d_Filename", mtport, mtslot ), ini.Entry( wxsFormat( L"Multitap%u_Slot%u_Filename", mtport, mtslot ),
Mcd[slot].Filename, defaults.Mcd[slot].Filename ); Mcd[slot].Filename, defaults.Mcd[slot].Filename );
} }
} }

View File

@ -176,7 +176,7 @@ namespace Dialogs
public: public:
virtual ~CreateMemoryCardDialog() throw() {} virtual ~CreateMemoryCardDialog() throw() {}
//CreateMemoryCardDialog( wxWindow* parent, uint port, uint slot, const wxString& filepath=wxEmptyString ); //CreateMemoryCardDialog( wxWindow* parent, uint port, uint slot, const wxString& filepath=wxEmptyString );
CreateMemoryCardDialog( wxWindow* parent, uint port, const wxDirName& mcdpath, const wxString& mcdfile=wxEmptyString ); CreateMemoryCardDialog( wxWindow* parent, uint slot, const wxDirName& mcdpath, const wxString& mcdfile=wxEmptyString );
wxDirName GetPathToMcds() const; wxDirName GetPathToMcds() const;

View File

@ -103,8 +103,8 @@ uint FileMcd_GetMtapSlot(uint slot)
pxFailDev( "Invalid parameter in call to GetMtapSlot -- specified slot is one of the base slots, not a Multitap slot." ); pxFailDev( "Invalid parameter in call to GetMtapSlot -- specified slot is one of the base slots, not a Multitap slot." );
break; break;
case 2: case 3: case 4: return 0; case 2: case 3: case 4: return slot-2;
case 5: case 6: case 7: return 1; case 5: case 6: case 7: return slot-5;
jNO_DEFAULT jNO_DEFAULT
} }

View File

@ -132,6 +132,7 @@ void NTFS_CompressFile( const wxString& file, bool compressStatus )
bool isFile = !wxDirExists( file ); bool isFile = !wxDirExists( file );
if( isFile && !wxFileExists( file ) ) return; if( isFile && !wxFileExists( file ) ) return;
if( GetFileAttributes(file) & FILE_ATTRIBUTE_COMPRESSED ) return;
if( !wxIsWritable( file ) ) return; if( !wxIsWritable( file ) ) return;
const DWORD flags = isFile ? FILE_ATTRIBUTE_NORMAL : (FILE_FLAG_BACKUP_SEMANTICS | FILE_ATTRIBUTE_DIRECTORY); const DWORD flags = isFile ? FILE_ATTRIBUTE_NORMAL : (FILE_FLAG_BACKUP_SEMANTICS | FILE_ATTRIBUTE_DIRECTORY);