Added cdutils which suppose to scan for devices in a portable way (ripped from cdio)

Changed the Code to use it instead of DriveUtil code.
Please test the code


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2413 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee
2009-02-24 15:04:12 +00:00
parent e79a93f616
commit 9b1f0f9083
9 changed files with 14 additions and 122 deletions

View File

@ -100,15 +100,14 @@ void CFrame::CreateMenu()
wxMenu* fileMenu = new wxMenu;
m_pMenuItemOpen = fileMenu->Append(wxID_OPEN, _T("&Open...\tCtrl+O"));
#if defined(_WIN32) || defined(__GNUC__) // not tested on os x
wxMenu *externalDrive = new wxMenu;
fileMenu->AppendSubMenu(externalDrive, _T("&Boot from DVD Drive..."));
GetAllRemovableDrives(&drives);
for (int i = 0; i < drives.size() && i < 24; i++)
{
externalDrive->Append(IDM_DRIVE1 + i, wxString::FromAscii(drives.at(i).c_str()));
drives = cdio_get_devices();
for (int i = 0; drives[i] != NULL && i < 24; i++) {
externalDrive->Append(IDM_DRIVE1 + i, wxString::FromAscii(drives[i]));
}
#endif
fileMenu->AppendSeparator();
fileMenu->Append(wxID_REFRESH, _T("&Refresh List"));
fileMenu->AppendSeparator();
@ -489,7 +488,7 @@ void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
void CFrame::OnBootDrive(wxCommandEvent& event)
{
BootManager::BootCore(drives.at(event.GetId()-IDM_DRIVE1).c_str());
BootManager::BootCore(drives[event.GetId()-IDM_DRIVE1]);
}
////////////////////////////////////////////////////