fix changedisc (broken by switch to unicode)

char * was deallocated before callback was reached, How did it work before XTra.KrazzY?

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3969 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
LPFaint99
2009-08-12 05:57:59 +00:00
parent 70f5d17d43
commit b4faea0186
2 changed files with 19 additions and 10 deletions

View File

@ -474,7 +474,10 @@ void CFrame::DoOpen(bool Boot)
{
if (!fileChosen)
path = wxT("");
DVDInterface::ChangeDisc((const char *)path.mb_str());
// temp is deleted by changediscCallback
char * temp = new char[strlen(path.mb_str())];
strncpy(temp, path.mb_str(), strlen(path.mb_str()));
DVDInterface::ChangeDisc(temp);
}
}
@ -631,7 +634,7 @@ void CFrame::OnShow_InfoWindow(wxCommandEvent& WXUNUSED (event))
void CFrame::OnLoadWiiMenu(wxCommandEvent& WXUNUSED (event))
{
BootManager::BootCore(FULL_WII_MENU_DIR);
BootManager::BootCore(FULL_WII_MENU_DIR);
}
// Toogle fullscreen. In Windows the fullscreen mode is accomplished by expanding the m_Panel to cover