Consolidate wad installation to one function in the GUI

now if you install the sysmenu from a wad in the gamelist the menubar will be updated with the new sysmenu version

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7528 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
LPFaint99
2011-05-08 02:56:09 +00:00
parent 561b227b77
commit ffea55d42a
6 changed files with 55 additions and 61 deletions

View File

@ -248,14 +248,13 @@ void CWiiSaveCrypted::ImportWiiSaveFiles()
return;
}
int lastpos = HEADER_SZ + BK_SZ;
fpData_bin.Seek(HEADER_SZ + BK_SZ, SEEK_SET);
FileHDR _tmpFileHDR;
for(u32 i = 0; i < _numberOfFiles; i++)
{
fpData_bin.Seek(lastpos, SEEK_SET);
memset(&_tmpFileHDR, 0, FILE_HDR_SZ);
memset(IV, 0, 0x10);
_fileSize = 0;
@ -266,7 +265,6 @@ void CWiiSaveCrypted::ImportWiiSaveFiles()
b_valid = false;
}
lastpos += FILE_HDR_SZ;
if (Common::swap32(_tmpFileHDR.magic) != FILE_HDR_MAGIC)
{
PanicAlertT("Bad File Header");
@ -287,7 +285,6 @@ void CWiiSaveCrypted::ImportWiiSaveFiles()
{
_fileSize = Common::swap32(_tmpFileHDR.size);
u32 RoundedFileSize = ROUND_UP(_fileSize, BLOCK_SZ);
lastpos += RoundedFileSize;
_encryptedData = new u8[RoundedFileSize];
_data = new u8[RoundedFileSize];
if (!fpData_bin.ReadBytes(_encryptedData, RoundedFileSize))