Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'wiiSaveExportFixes'
saves like super smash bros brawl, mario kart, etc which use simple copy restriction via the banner file are now able to be imported natively with the wii/wiiU system menu
save files which include subdirs are correctly packaged

NOTE: saves which include 'nocopy'/'nomove' folders will likely always require homebrew

adds feature to export all wii saves
  • Loading branch information
LPFaint99 committed Aug 31, 2013
2 parents df7b4da + c2d208d commit 199c4e0
Show file tree
Hide file tree
Showing 7 changed files with 159 additions and 99 deletions.
1 change: 1 addition & 0 deletions Source/Core/DolphinWX/Src/Frame.cpp
Expand Up @@ -191,6 +191,7 @@ EVT_MENU(IDM_NETPLAY, CFrame::OnNetPlay)
EVT_MENU(IDM_BROWSE, CFrame::OnBrowse)
EVT_MENU(IDM_MEMCARD, CFrame::OnMemcard)
EVT_MENU(IDM_IMPORTSAVE, CFrame::OnImportSave)
EVT_MENU(IDM_EXPORTALLSAVE, CFrame::OnExportAllSaves)
EVT_MENU(IDM_CHEATS, CFrame::OnShow_CheatsWindow)
EVT_MENU(IDM_CHANGEDISC, CFrame::OnChangeDisc)
EVT_MENU(IDM_MENU_INSTALLWAD, CFrame::OnInstallWAD)
Expand Down
1 change: 1 addition & 0 deletions Source/Core/DolphinWX/Src/Frame.h
Expand Up @@ -324,6 +324,7 @@ class CFrame : public CRenderFrame

void OnMemcard(wxCommandEvent& event); // Misc
void OnImportSave(wxCommandEvent& event);
void OnExportAllSaves(wxCommandEvent& event);

void OnNetPlay(wxCommandEvent& event);

Expand Down
12 changes: 8 additions & 4 deletions Source/Core/DolphinWX/Src/FrameTools.cpp
Expand Up @@ -190,7 +190,8 @@ void CFrame::CreateMenu()
// Tools menu
wxMenu* toolsMenu = new wxMenu;
toolsMenu->Append(IDM_MEMCARD, _("&Memcard Manager (GC)"));
toolsMenu->Append(IDM_IMPORTSAVE, _("Wii Save Import"));
toolsMenu->Append(IDM_IMPORTSAVE, _("Import Wii Save"));
toolsMenu->Append(IDM_EXPORTALLSAVE, _("Export All Wii Saves"));
toolsMenu->Append(IDM_CHEATS, _("&Cheats Manager"));

toolsMenu->Append(IDM_NETPLAY, _("Start &NetPlay"));
Expand Down Expand Up @@ -1310,6 +1311,11 @@ void CFrame::OnMemcard(wxCommandEvent& WXUNUSED (event))
MemcardManager.ShowModal();
}

void CFrame::OnExportAllSaves(wxCommandEvent& WXUNUSED (event))
{
CWiiSaveCrypted::ExportAllSaves();
}

void CFrame::OnImportSave(wxCommandEvent& WXUNUSED (event))
{
wxString path = wxFileSelector(_("Select the save file"),
Expand All @@ -1320,9 +1326,7 @@ void CFrame::OnImportSave(wxCommandEvent& WXUNUSED (event))

if (!path.IsEmpty())
{
// TODO: Does this actually need to be dynamically allocated for some reason?
CWiiSaveCrypted* saveFile = new CWiiSaveCrypted(WxStrToStr(path).c_str());
delete saveFile;
CWiiSaveCrypted::ImportWiiSave(WxStrToStr(path).c_str());
}
}

Expand Down
3 changes: 1 addition & 2 deletions Source/Core/DolphinWX/Src/GameListCtrl.cpp
Expand Up @@ -969,8 +969,7 @@ void CGameListCtrl::OnExportSave(wxCommandEvent& WXUNUSED (event))
if (Iso->GetTitleID((u8*)&title))
{
title = Common::swap64(title);
CWiiSaveCrypted* exportSave = new CWiiSaveCrypted("", title);
delete exportSave;
CWiiSaveCrypted::ExportWiiSave(title);
}
delete Iso;
}
Expand Down
1 change: 1 addition & 0 deletions Source/Core/DolphinWX/Src/Globals.h
Expand Up @@ -231,6 +231,7 @@ enum
IDM_OPENSAVEFOLDER,
IDM_EXPORTSAVE,
IDM_IMPORTSAVE,
IDM_EXPORTALLSAVE,
IDM_SETDEFAULTGCM,
IDM_DELETEGCM,
IDM_COMPRESSGCM,
Expand Down

0 comments on commit 199c4e0

Please sign in to comment.