pcsx2: Remove unused MenuId_Sys_Restart and related code

This commit is contained in:
Jonathan Li 2017-03-21 19:06:34 +00:00
parent 1837d43d96
commit e344578a01
5 changed files with 2 additions and 44 deletions

View File

@ -93,7 +93,6 @@ enum MenuIdentifiers
MenuId_Sys_SuspendResume, // suspends/resumes active emulation, retains plugin states
MenuId_Sys_Restart, // Issues a complete VM reset (wipes preserved states)
MenuId_Sys_Shutdown, // Closes virtual machine, shuts down plugins, wipes states.
MenuId_Sys_LoadStates, // Opens load states submenu
MenuId_Sys_SaveStates, // Opens save states submenu
@ -763,7 +762,6 @@ extern void UI_EnableStateActions();
extern void UI_DisableSysActions();
extern void UI_EnableSysActions();
extern void UI_DisableSysReset();
extern void UI_DisableSysShutdown();

View File

@ -203,8 +203,6 @@ void MainEmuFrame::ConnectMenus()
Bind(wxEVT_MENU, &MainEmuFrame::Menu_EnableHostFs_Click, this, MenuId_EnableHostFs);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_SysShutdown_Click, this, MenuId_Sys_Shutdown);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Exit_Click, this, MenuId_Exit);
// No actual menu item for this.
//Bind(wxEVT_MENU, &MainEmuFrame::Menu_SysReset_Click, this, MenuId_Sys_Restart);
// CDVD
Bind(wxEVT_MENU, &MainEmuFrame::Menu_IsoBrowse_Click, this, MenuId_IsoBrowse);
@ -593,15 +591,10 @@ void MainEmuFrame::ApplyCoreStatus()
{
wxMenuBar& menubar( *GetMenuBar() );
wxMenuItem* susres = menubar.FindItem( MenuId_Sys_SuspendResume );
wxMenuItem* restart = menubar.FindItem( MenuId_Sys_Restart );
// [TODO] : Ideally each of these items would bind a listener instance to the AppCoreThread
// dispatcher, and modify their states accordingly. This is just a hack (for now) -- air
bool ActiveVM = SysHasValidState();
if( susres )
if (wxMenuItem* susres = menubar.FindItem(MenuId_Sys_SuspendResume))
{
if( !CoreThread.IsClosing() )
{
@ -611,6 +604,7 @@ void MainEmuFrame::ApplyCoreStatus()
}
else
{
bool ActiveVM = SysHasValidState();
susres->Enable(ActiveVM);
if( ActiveVM )
{
@ -625,20 +619,6 @@ void MainEmuFrame::ApplyCoreStatus()
}
}
if( restart )
{
if( ActiveVM )
{
restart->SetItemLabel(_("Res&tart"));
restart->SetHelp(_("Simulates hardware reset of the PS2 virtual machine."));
}
else
{
restart->Enable( false );
restart->SetHelp(_("No emulation state is active; boot something first."));
}
}
const CDVD_SourceType Source = g_Conf->CdvdSource;
const MenuIdentifiers fullboot_id = MenuId_Boot_CDVD;
const MenuIdentifiers fastboot_id = MenuId_Boot_CDVD2;
@ -680,7 +660,6 @@ void MainEmuFrame::ApplyCoreStatus()
if (wxMenuItem *cdvd_full = menubar.FindItem(fullboot_id))
{
switch (Source)
{
case CDVD_SourceType::Iso:

View File

@ -185,7 +185,6 @@ protected:
void Menu_Exit_Click(wxCommandEvent &event);
void Menu_SuspendResume_Click(wxCommandEvent &event);
void Menu_SysReset_Click(wxCommandEvent &event);
void Menu_SysShutdown_Click(wxCommandEvent &event);
void Menu_ConfigPlugin_Click(wxCommandEvent &event);

View File

@ -544,12 +544,6 @@ void MainEmuFrame::Menu_SuspendResume_Click(wxCommandEvent &event)
GetSysExecutorThread().PostEvent( new SysExecEvent_ToggleSuspend() );
}
void MainEmuFrame::Menu_SysReset_Click(wxCommandEvent &event)
{
UI_DisableSysReset();
sApp.SysExecute();
}
void MainEmuFrame::Menu_SysShutdown_Click(wxCommandEvent &event)
{
//if( !SysHasValidState() && !CorePlugins.AreAnyInitialized() ) return;

View File

@ -50,19 +50,10 @@ void UI_UpdateSysControls()
_SaveLoadStuff( SysHasValidState() );
}
void UI_DisableSysReset()
{
if( wxGetApp().Rpc_TryInvokeAsync( UI_DisableSysReset ) ) return;
sMainFrame.EnableMenuItem( MenuId_Sys_Restart, false );
_SaveLoadStuff( false );
}
void UI_DisableSysShutdown()
{
if( wxGetApp().Rpc_TryInvokeAsync( &UI_DisableSysShutdown ) ) return;
sMainFrame.EnableMenuItem( MenuId_Sys_Restart, false );
sMainFrame.EnableMenuItem( MenuId_Sys_Shutdown, false );
}
@ -70,7 +61,6 @@ void UI_EnableSysShutdown()
{
if( wxGetApp().Rpc_TryInvokeAsync( &UI_EnableSysShutdown ) ) return;
sMainFrame.EnableMenuItem( MenuId_Sys_Restart, true );
sMainFrame.EnableMenuItem( MenuId_Sys_Shutdown, true );
}
@ -79,7 +69,6 @@ void UI_DisableSysActions()
{
if( wxGetApp().Rpc_TryInvokeAsync( &UI_DisableSysActions ) ) return;
sMainFrame.EnableMenuItem( MenuId_Sys_Restart, false );
sMainFrame.EnableMenuItem( MenuId_Sys_Shutdown, false );
_SaveLoadStuff( false );
@ -89,7 +78,6 @@ void UI_EnableSysActions()
{
if( wxGetApp().Rpc_TryInvokeAsync( &UI_EnableSysActions ) ) return;
sMainFrame.EnableMenuItem( MenuId_Sys_Restart, true );
sMainFrame.EnableMenuItem( MenuId_Sys_Shutdown, true );
_SaveLoadStuff( true );