From bdbdef51eed810bea0a37e6e7e2def27393d204b Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Sun, 16 May 2010 17:11:51 +0000 Subject: [PATCH] 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 --- Source/Core/DolphinWX/Src/FrameTools.cpp | 7 +++---- .../Src/MemoryCards/WiiSaveCrypted.cpp | 17 ++++------------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index f6cd332f31..fa18408cd5 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -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); } } } diff --git a/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.cpp b/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.cpp index fd9ff073f0..a738fe14fe 100644 --- a/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.cpp +++ b/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.cpp @@ -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& 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& Directories.push_back(FST_Temp.children.at(j).physicalName); } else - { + { FileList.push_back(FST_Temp.children.at(j).physicalName); } }