Add Change Disc option to the right-click menu in the game list. For issue 7411.
This commit is contained in:
parent
fb18b8b689
commit
25bd5e237b
|
@ -52,6 +52,7 @@
|
||||||
#include "Core/CoreParameter.h"
|
#include "Core/CoreParameter.h"
|
||||||
#include "Core/Movie.h"
|
#include "Core/Movie.h"
|
||||||
#include "Core/Boot/Boot.h"
|
#include "Core/Boot/Boot.h"
|
||||||
|
#include "Core/HW/DVDInterface.h"
|
||||||
#include "DiscIO/Blob.h"
|
#include "DiscIO/Blob.h"
|
||||||
#include "DiscIO/Volume.h"
|
#include "DiscIO/Volume.h"
|
||||||
#include "DiscIO/VolumeCreator.h"
|
#include "DiscIO/VolumeCreator.h"
|
||||||
|
@ -209,6 +210,7 @@ BEGIN_EVENT_TABLE(CGameListCtrl, wxListCtrl)
|
||||||
EVT_MENU(IDM_MULTICOMPRESSGCM, CGameListCtrl::OnMultiCompressGCM)
|
EVT_MENU(IDM_MULTICOMPRESSGCM, CGameListCtrl::OnMultiCompressGCM)
|
||||||
EVT_MENU(IDM_MULTIDECOMPRESSGCM, CGameListCtrl::OnMultiDecompressGCM)
|
EVT_MENU(IDM_MULTIDECOMPRESSGCM, CGameListCtrl::OnMultiDecompressGCM)
|
||||||
EVT_MENU(IDM_DELETEGCM, CGameListCtrl::OnDeleteGCM)
|
EVT_MENU(IDM_DELETEGCM, CGameListCtrl::OnDeleteGCM)
|
||||||
|
EVT_MENU(IDM_LIST_CHANGEDISC, CGameListCtrl::OnChangeDisc)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
CGameListCtrl::CGameListCtrl(wxWindow* parent, const wxWindowID id, const
|
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"));
|
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);
|
PopupMenu(popupMenu);
|
||||||
}
|
}
|
||||||
|
@ -1263,6 +1271,14 @@ void CGameListCtrl::OnCompressGCM(wxCommandEvent& WXUNUSED (event))
|
||||||
Update();
|
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)
|
void CGameListCtrl::OnSize(wxSizeEvent& event)
|
||||||
{
|
{
|
||||||
if (lastpos == event.GetSize())
|
if (lastpos == event.GetSize())
|
||||||
|
|
|
@ -104,6 +104,7 @@ private:
|
||||||
void OnMultiCompressGCM(wxCommandEvent& event);
|
void OnMultiCompressGCM(wxCommandEvent& event);
|
||||||
void OnMultiDecompressGCM(wxCommandEvent& event);
|
void OnMultiDecompressGCM(wxCommandEvent& event);
|
||||||
void OnInstallWAD(wxCommandEvent& event);
|
void OnInstallWAD(wxCommandEvent& event);
|
||||||
|
void OnChangeDisc(wxCommandEvent& event);
|
||||||
|
|
||||||
void CompressSelection(bool _compress);
|
void CompressSelection(bool _compress);
|
||||||
void AutomaticColumnWidth();
|
void AutomaticColumnWidth();
|
||||||
|
|
|
@ -90,6 +90,7 @@ enum
|
||||||
IDM_NETPLAY,
|
IDM_NETPLAY,
|
||||||
IDM_RESTART,
|
IDM_RESTART,
|
||||||
IDM_CHANGEDISC,
|
IDM_CHANGEDISC,
|
||||||
|
IDM_LIST_CHANGEDISC,
|
||||||
IDM_PROPERTIES,
|
IDM_PROPERTIES,
|
||||||
IDM_GAMEWIKI,
|
IDM_GAMEWIKI,
|
||||||
IDM_LOAD_WII_MENU,
|
IDM_LOAD_WII_MENU,
|
||||||
|
|
Loading…
Reference in New Issue