Add an option to eject the disc

This commit is contained in:
JosJuice
2017-09-17 11:44:48 +02:00
parent 3c770693a2
commit e4faabb763
9 changed files with 24 additions and 3 deletions
+3
View File
@@ -961,6 +961,8 @@ static int GetMenuIDFromHotkey(unsigned int key)
return wxID_OPEN;
case HK_CHANGE_DISC:
return IDM_CHANGE_DISC;
case HK_EJECT_DISC:
return IDM_EJECT_DISC;
case HK_REFRESH_LIST:
return wxID_REFRESH;
case HK_PLAY_PAUSE:
@@ -1305,6 +1307,7 @@ void CFrame::ParseHotkeys()
{
case HK_OPEN:
case HK_CHANGE_DISC:
case HK_EJECT_DISC:
case HK_REFRESH_LIST:
case HK_RESET:
case HK_START_RECORDING:
+1
View File
@@ -299,6 +299,7 @@ private:
void OnShowInputDisplay(wxCommandEvent& event);
void OnShowRTCDisplay(wxCommandEvent& event);
void OnChangeDisc(wxCommandEvent& event);
void OnEjectDisc(wxCommandEvent& event);
void OnScreenshot(wxCommandEvent& event);
void OnActive(wxActivateEvent& event);
void OnClose(wxCloseEvent& event);
+6
View File
@@ -127,6 +127,7 @@ void CFrame::BindMenuBarEvents()
// File menu
Bind(wxEVT_MENU, &CFrame::OnOpen, this, wxID_OPEN);
Bind(wxEVT_MENU, &CFrame::OnChangeDisc, this, IDM_CHANGE_DISC);
Bind(wxEVT_MENU, &CFrame::OnEjectDisc, this, IDM_EJECT_DISC);
Bind(wxEVT_MENU, &CFrame::OnBootDrive, this, IDM_DRIVE1, IDM_DRIVE24);
Bind(wxEVT_MENU, &CFrame::OnRefresh, this, wxID_REFRESH);
Bind(wxEVT_MENU, &CFrame::OnQuit, this, wxID_EXIT);
@@ -459,6 +460,11 @@ void CFrame::OnChangeDisc(wxCommandEvent& WXUNUSED(event))
DoOpen(false);
}
void CFrame::OnEjectDisc(wxCommandEvent& WXUNUSED(event))
{
Core::RunAsCPUThread(DVDInterface::EjectDisc);
}
void CFrame::OnRecord(wxCommandEvent& WXUNUSED(event))
{
if ((!Core::IsRunningAndStarted() && Core::IsRunning()) || Movie::IsRecordingInput() ||
+1
View File
@@ -94,6 +94,7 @@ enum
IDM_CHEATS,
IDM_NETPLAY,
IDM_RESTART,
IDM_EJECT_DISC,
IDM_CHANGE_DISC,
IDM_LIST_CHANGE_DISC,
IDM_PROPERTIES,
+1
View File
@@ -79,6 +79,7 @@ wxMenu* MainMenuBar::CreateFileMenu() const
auto* const file_menu = new wxMenu;
file_menu->Append(wxID_OPEN, _("&Open..."));
file_menu->Append(IDM_CHANGE_DISC, _("Change &Disc..."));
file_menu->Append(IDM_EJECT_DISC, _("Eject Disc"));
file_menu->Append(IDM_DRIVES, _("&Boot from DVD Backup"), external_drive_menu);
file_menu->AppendSeparator();
file_menu->Append(wxID_REFRESH, _("&Refresh Game List"));