Fix changing disc on win32, (my dumb mistake, strlen doesnt include \0)
make changing disc a little less ugly Fixes issue 2114 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4939 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
fbdf721e0e
commit
ed8742dd4d
|
@ -289,7 +289,6 @@ void ChangeDiscCallback(u64 userdata, int cyclesLate)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
delete [] (char *) userdata;
|
|
||||||
if (VolumeHandler::SetVolumeName(FileName))
|
if (VolumeHandler::SetVolumeName(FileName))
|
||||||
{
|
{
|
||||||
// Save the new ISO file name
|
// Save the new ISO file name
|
||||||
|
|
|
@ -198,6 +198,7 @@ class CFrame : public wxFrame
|
||||||
bool m_bNoDocking;
|
bool m_bNoDocking;
|
||||||
bool m_bModalDialogOpen;
|
bool m_bModalDialogOpen;
|
||||||
bool m_bControlsCreated;
|
bool m_bControlsCreated;
|
||||||
|
char newDiscpath[2048];
|
||||||
wxMessageDialog *m_StopDlg;
|
wxMessageDialog *m_StopDlg;
|
||||||
|
|
||||||
char **drives;
|
char **drives;
|
||||||
|
|
|
@ -556,12 +556,8 @@ void CFrame::DoOpen(bool Boot)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!fileChosen)
|
strncpy(newDiscpath, path.mb_str(), strlen(path.mb_str())+1);
|
||||||
path = wxT("");
|
DVDInterface::ChangeDisc(newDiscpath);
|
||||||
// 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -367,13 +367,13 @@ bool DolphinApp::OnInit()
|
||||||
if (selectPadPlugin && padPluginFilename != wxEmptyString)
|
if (selectPadPlugin && padPluginFilename != wxEmptyString)
|
||||||
{
|
{
|
||||||
int k;
|
int k;
|
||||||
for(k=0;k<4;k++)
|
for(k=0;k<MAXPADS;k++)
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin[k] = std::string(padPluginFilename.mb_str());
|
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin[k] = std::string(padPluginFilename.mb_str());
|
||||||
}
|
}
|
||||||
if (selectWiimotePlugin && wiimotePluginFilename != wxEmptyString)
|
if (selectWiimotePlugin && wiimotePluginFilename != wxEmptyString)
|
||||||
{
|
{
|
||||||
int k;
|
int k;
|
||||||
for(k=0;k<4;k++)
|
for(k=0;k<MAXWIIMOTES;k++)
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin[k] = std::string(wiimotePluginFilename.mb_str());
|
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin[k] = std::string(wiimotePluginFilename.mb_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue