mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Added a DVD menu to main frame and small code move.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1631 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -223,10 +223,8 @@ void SetDiscInside(bool _DiscInside)
|
|||||||
}
|
}
|
||||||
void SwapDisc(const char * fileName)
|
void SwapDisc(const char * fileName)
|
||||||
{
|
{
|
||||||
SetLidOpen(true);
|
|
||||||
VolumeHandler::SetVolumeName(fileName);
|
VolumeHandler::SetVolumeName(fileName);
|
||||||
DVDInterface::SetDiscInside(VolumeHandler::IsValid());
|
DVDInterface::SetDiscInside(VolumeHandler::IsValid());
|
||||||
SetLidOpen(false);
|
|
||||||
}
|
}
|
||||||
void SetLidOpen(bool _bOpen)
|
void SetLidOpen(bool _bOpen)
|
||||||
{
|
{
|
||||||
|
@ -242,6 +242,12 @@ void CFrame::CreateMenu()
|
|||||||
#endif
|
#endif
|
||||||
m_pMenuBar->Append(pOptionsMenu, _T("&Options"));
|
m_pMenuBar->Append(pOptionsMenu, _T("&Options"));
|
||||||
|
|
||||||
|
//DVD menu
|
||||||
|
wxMenu* dvdMenu = new wxMenu;
|
||||||
|
dvdMenu->Append(IDM_SWAPDISC, _T("S&wap Disc"));
|
||||||
|
dvdMenu->Append(IDM_TOGGLECOVER, _T("Toggle \"DVD co&ver is open\""));
|
||||||
|
m_pMenuBar->Append(dvdMenu, _T("&DVD"));
|
||||||
|
|
||||||
// misc menu
|
// misc menu
|
||||||
wxMenu* miscMenu = new wxMenu;
|
wxMenu* miscMenu = new wxMenu;
|
||||||
miscMenu->AppendCheckItem(IDM_TOGGLE_TOOLBAR, _T("View &toolbar"));
|
miscMenu->AppendCheckItem(IDM_TOGGLE_TOOLBAR, _T("View &toolbar"));
|
||||||
@ -251,8 +257,6 @@ void CFrame::CreateMenu()
|
|||||||
miscMenu->AppendSeparator();
|
miscMenu->AppendSeparator();
|
||||||
miscMenu->Append(IDM_MEMCARD, _T("&Memcard manager"));
|
miscMenu->Append(IDM_MEMCARD, _T("&Memcard manager"));
|
||||||
miscMenu->Append(IDM_CHEATS, _T("Action &Replay Manager"));
|
miscMenu->Append(IDM_CHEATS, _T("Action &Replay Manager"));
|
||||||
miscMenu->Append(IDM_SWAPDISC, _T("S&wap Disc"));
|
|
||||||
//miscMenu->Append(IDM_TOGGLECOVER, _T("Toggle DVD co&ver is open"));
|
|
||||||
m_pMenuBar->Append(miscMenu, _T("&Misc"));
|
m_pMenuBar->Append(miscMenu, _T("&Misc"));
|
||||||
|
|
||||||
// help menu
|
// help menu
|
||||||
@ -689,6 +693,7 @@ void CFrame::OnSwapDisc(wxCommandEvent& event)
|
|||||||
{
|
{
|
||||||
case IDM_SWAPDISC:
|
case IDM_SWAPDISC:
|
||||||
{
|
{
|
||||||
|
SetLidOpen(true);
|
||||||
wxString path = wxFileSelector(
|
wxString path = wxFileSelector(
|
||||||
_T("Select the Disc to swap"),
|
_T("Select the Disc to swap"),
|
||||||
wxEmptyString, wxEmptyString, wxEmptyString,
|
wxEmptyString, wxEmptyString, wxEmptyString,
|
||||||
@ -701,6 +706,7 @@ void CFrame::OnSwapDisc(wxCommandEvent& event)
|
|||||||
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
|
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
|
||||||
this);
|
this);
|
||||||
SwapDisc(path.mb_str());
|
SwapDisc(path.mb_str());
|
||||||
|
SetLidOpen(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user