diff options
| author | Leo Lam <leolino.lam@gmail.com> | 2017-09-18 12:47:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-18 12:47:47 +0200 |
| commit | c9f790dca470c7800e01795210d4d19ca96e9710 (patch) | |
| tree | 86819eab712ec412edc21c6b02cdc880101fde90 /Source/Core/DolphinWX/FrameTools.cpp | |
| parent | 1566f3ae7e8c018ccf008e825aaf7a2590f23c26 (diff) | |
| parent | e4faabb763520d57c27cfdc827ce5e5b0b896d94 (diff) | |
Merge pull request #6072 from JosJuice/eject-disc
Add an option to eject the disc
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/FrameTools.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index 89726223dc..0db98e74ea 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -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); @@ -369,7 +370,7 @@ void CFrame::DoOpen(bool Boot) } else { - DVDInterface::ChangeDiscAsHost(WxStrToStr(path)); + Core::RunAsCPUThread([&path] { DVDInterface::ChangeDisc(WxStrToStr(path)); }); } } @@ -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() || |
