Fixes importing and exporting wii saves with dirs.

disable install wii menu item after installation (restart required still for NANDContentLoader to find it

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5456 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
LPFaint99 2010-05-16 17:11:51 +00:00
parent 869f5e64c7
commit bdbdef51ee
2 changed files with 7 additions and 17 deletions

View file

@ -183,7 +183,7 @@ void CFrame::CreateMenu()
wxMenu* toolsMenu = new wxMenu;
toolsMenu->Append(IDM_LUA, _T("New &Lua Console"));
toolsMenu->Append(IDM_MEMCARD, _T("&Memcard Manager (GC)"));
toolsMenu->Append(IDM_IMPORTSAVE, _T("Wii Save Import (experimental)"));
toolsMenu->Append(IDM_IMPORTSAVE, _T("Wii Save Import"));
toolsMenu->Append(IDM_CHEATS, _T("Action &Replay Manager"));
toolsMenu->Append(IDM_NETPLAY, _T("Start &NetPlay"));
@ -1061,9 +1061,8 @@ void CFrame::OnLoadWiiMenu(wxCommandEvent& event)
this);
if (CBoot::Install_WiiWAD(path.mb_str()))
{;// TODO: Fix so that menu item changes approprately so a restart is not required
// GetMenuBar()->FindItem(IDM_INSTALL_WII_MENU)->SetId(IDM_LOAD_WII_MENU);
// GetMenuBar()->FindItem(IDM_LOAD_WII_MENU)->SetItemLabel(_T("Load Wii Menu"));
{
GetMenuBar()->FindItem(IDM_INSTALL_WII_MENU)->Enable(false);
}
}
}

View file

@ -287,16 +287,8 @@ void CWiiSaveCrypted::ImportWiiSaveFiles()
else
{
sprintf(pathRawSave, "%s%s", pathSavedir, _tmpFileHDR.name);
if (_tmpFileHDR.type == 2)
{
PanicAlert("savegame with a dir, report me :p, %s", pathRawSave);
// TODO: tachtig doesnt write future files to this dir
// for now, put the rest of the files in the new folder
File::CreateFullPath(pathRawSave);
strcpy(pathSavedir, pathRawSave);
}
else
File::CreateFullPath(pathRawSave);
if (_tmpFileHDR.type == 1)
{
_fileSize = Common::swap32(_tmpFileHDR.size);
lastpos += ROUND_UP(_fileSize, BLOCK_SZ);
@ -552,8 +544,7 @@ void CWiiSaveCrypted::ScanForFiles(std::string savDir, std::vector<std::string>&
File::ScanDirectoryTree(Directories.at(i).c_str(), FST_Temp);
for (u32 j = 0; j < FST_Temp.children.size(); j++)
{
if (strncmp(FST_Temp.children.at(j).virtualName.c_str(), "banner.bin", 10) != 0 &&
strncmp(FST_Temp.children.at(j).virtualName.c_str(), "nocopy", 6) != 0)
if (strncmp(FST_Temp.children.at(j).virtualName.c_str(), "banner.bin", 10) != 0)
{
(*_numFiles)++;
*_sizeFiles += FILE_HDR_SZ + ROUND_UP(FST_Temp.children.at(j).size, BLOCK_SZ);
@ -563,7 +554,7 @@ void CWiiSaveCrypted::ScanForFiles(std::string savDir, std::vector<std::string>&
Directories.push_back(FST_Temp.children.at(j).physicalName);
}
else
{
{
FileList.push_back(FST_Temp.children.at(j).physicalName);
}
}