revert memcardmanager.cpp changes made in r926
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1089 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
5a9b38d639
commit
3bd72c5e3f
|
@ -206,7 +206,7 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
|
||||||
int index1 = m_MemcardList[1]->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
|
int index1 = m_MemcardList[1]->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
|
||||||
int slot = 1;
|
int slot = 1;
|
||||||
int index2 = index1;
|
int index2 = index1;
|
||||||
std::string fileName2 = NULL;
|
char * fileName2 = NULL;
|
||||||
|
|
||||||
switch(event.GetId())
|
switch(event.GetId())
|
||||||
{
|
{
|
||||||
|
@ -234,10 +234,11 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ID_CONVERTTOGCI:
|
case ID_CONVERTTOGCI:
|
||||||
|
fileName2 = new char;
|
||||||
case ID_SAVEIMPORTLEFT:
|
case ID_SAVEIMPORTLEFT:
|
||||||
slot = 0;
|
slot = 0;
|
||||||
case ID_SAVEIMPORTRIGHT:
|
case ID_SAVEIMPORTRIGHT:
|
||||||
if (memoryCard[slot] != NULL || !fileName2.empty())
|
if (memoryCard[slot] != NULL || fileName2 != NULL)
|
||||||
{
|
{
|
||||||
wxString temp = wxFileSelector(_T("Select the GCI file to import"),
|
wxString temp = wxFileSelector(_T("Select the GCI file to import"),
|
||||||
wxEmptyString, wxEmptyString, wxEmptyString,wxString::Format
|
wxEmptyString, wxEmptyString, wxEmptyString,wxString::Format
|
||||||
|
@ -245,14 +246,13 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
|
||||||
_T("Gamecube save files(*.gci,*.gcs,*.sav)|*.gci;*.gcs;*.sav|"
|
_T("Gamecube save files(*.gci,*.gcs,*.sav)|*.gci;*.gcs;*.sav|"
|
||||||
"Native GCI files (*.gci)|*.gci|"
|
"Native GCI files (*.gci)|*.gci|"
|
||||||
"MadCatz Gameshark files(*.gcs)|*.gcs|"
|
"MadCatz Gameshark files(*.gcs)|*.gcs|"
|
||||||
"Datel MaxDrive/Pro files(*.sav)|*.sav|"),
|
"Datel MaxDrive/Pro files(*.sav)|*.sav"),
|
||||||
_T("All files (%s)|%s"),
|
|
||||||
wxFileSelectorDefaultWildcardStr,
|
wxFileSelectorDefaultWildcardStr,
|
||||||
wxFileSelectorDefaultWildcardStr
|
wxFileSelectorDefaultWildcardStr
|
||||||
),
|
),
|
||||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST);
|
wxFD_OPEN | wxFD_FILE_MUST_EXIST);
|
||||||
const char * fileName = temp.ToAscii();
|
const char * fileName = temp.ToAscii();
|
||||||
if (!fileName2.empty() && !temp.empty())
|
if (*fileName2 != NULL && !temp.empty())
|
||||||
{
|
{
|
||||||
wxString temp2 = wxFileSelector(_T("Save GCI as.."),
|
wxString temp2 = wxFileSelector(_T("Save GCI as.."),
|
||||||
wxEmptyString, wxEmptyString, _T(".gci"), wxString::Format
|
wxEmptyString, wxEmptyString, _T(".gci"), wxString::Format
|
||||||
|
@ -262,11 +262,12 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
|
||||||
wxFileSelectorDefaultWildcardStr
|
wxFileSelectorDefaultWildcardStr
|
||||||
),
|
),
|
||||||
wxFD_OVERWRITE_PROMPT|wxFD_SAVE);
|
wxFD_OVERWRITE_PROMPT|wxFD_SAVE);
|
||||||
fileName2 = temp2.mb_str();
|
delete fileName2;
|
||||||
|
fileName2 = (char*)temp2.ToAscii();
|
||||||
}
|
}
|
||||||
if (temp.length() > 0)
|
if (temp.length() > 0)
|
||||||
{
|
{
|
||||||
switch(memoryCard[slot]->ImportGci(fileName, fileName2.c_str()))
|
switch(memoryCard[slot]->ImportGci(fileName, fileName2))
|
||||||
{
|
{
|
||||||
case LENGTHFAIL:
|
case LENGTHFAIL:
|
||||||
wxMessageBox(wxT("Imported file has invalid length"),
|
wxMessageBox(wxT("Imported file has invalid length"),
|
||||||
|
|
Loading…
Reference in New Issue