diff --git a/Source/Core/DolphinWX/GameListCtrl.cpp b/Source/Core/DolphinWX/GameListCtrl.cpp index 31b8dcdfc6..901336b657 100644 --- a/Source/Core/DolphinWX/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/GameListCtrl.cpp @@ -52,6 +52,7 @@ #include "Core/CoreParameter.h" #include "Core/Movie.h" #include "Core/Boot/Boot.h" +#include "Core/HW/DVDInterface.h" #include "DiscIO/Blob.h" #include "DiscIO/Volume.h" #include "DiscIO/VolumeCreator.h" @@ -209,6 +210,7 @@ BEGIN_EVENT_TABLE(CGameListCtrl, wxListCtrl) EVT_MENU(IDM_MULTICOMPRESSGCM, CGameListCtrl::OnMultiCompressGCM) EVT_MENU(IDM_MULTIDECOMPRESSGCM, CGameListCtrl::OnMultiDecompressGCM) EVT_MENU(IDM_DELETEGCM, CGameListCtrl::OnDeleteGCM) + EVT_MENU(IDM_LIST_CHANGEDISC, CGameListCtrl::OnChangeDisc) END_EVENT_TABLE() CGameListCtrl::CGameListCtrl(wxWindow* parent, const wxWindowID id, const @@ -903,6 +905,12 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event) { popupMenu->Append(IDM_LIST_INSTALLWAD, _("Install to Wii Menu")); } + if (selected_iso->GetPlatform() == GameListItem::GAMECUBE_DISC || + selected_iso->GetPlatform() == GameListItem::WII_DISC) + { + wxMenuItem* changeDiscItem = popupMenu->Append(IDM_LIST_CHANGEDISC, _("Change &Disc")); + changeDiscItem->Enable(Core::IsRunning()); + } PopupMenu(popupMenu); } @@ -1263,6 +1271,14 @@ void CGameListCtrl::OnCompressGCM(wxCommandEvent& WXUNUSED (event)) Update(); } +void CGameListCtrl::OnChangeDisc(wxCommandEvent& WXUNUSED(event)) +{ + const GameListItem *iso = GetSelectedISO(); + if (!iso || !Core::IsRunning()) + return; + DVDInterface::ChangeDisc(WxStrToStr(iso->GetFileName())); +} + void CGameListCtrl::OnSize(wxSizeEvent& event) { if (lastpos == event.GetSize()) diff --git a/Source/Core/DolphinWX/GameListCtrl.h b/Source/Core/DolphinWX/GameListCtrl.h index 0b71003a08..03aa01c93f 100644 --- a/Source/Core/DolphinWX/GameListCtrl.h +++ b/Source/Core/DolphinWX/GameListCtrl.h @@ -104,6 +104,7 @@ private: void OnMultiCompressGCM(wxCommandEvent& event); void OnMultiDecompressGCM(wxCommandEvent& event); void OnInstallWAD(wxCommandEvent& event); + void OnChangeDisc(wxCommandEvent& event); void CompressSelection(bool _compress); void AutomaticColumnWidth(); diff --git a/Source/Core/DolphinWX/Globals.h b/Source/Core/DolphinWX/Globals.h index 9a91b78be3..d51ee2c135 100644 --- a/Source/Core/DolphinWX/Globals.h +++ b/Source/Core/DolphinWX/Globals.h @@ -90,6 +90,7 @@ enum IDM_NETPLAY, IDM_RESTART, IDM_CHANGEDISC, + IDM_LIST_CHANGEDISC, IDM_PROPERTIES, IDM_GAMEWIKI, IDM_LOAD_WII_MENU,