mirror of https://github.com/PCSX2/pcsx2.git
pcsx2: Remove unused MenuId_Sys_Restart and related code
This commit is contained in:
parent
1837d43d96
commit
e344578a01
|
@ -93,7 +93,6 @@ enum MenuIdentifiers
|
||||||
|
|
||||||
|
|
||||||
MenuId_Sys_SuspendResume, // suspends/resumes active emulation, retains plugin states
|
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_Shutdown, // Closes virtual machine, shuts down plugins, wipes states.
|
||||||
MenuId_Sys_LoadStates, // Opens load states submenu
|
MenuId_Sys_LoadStates, // Opens load states submenu
|
||||||
MenuId_Sys_SaveStates, // Opens save states submenu
|
MenuId_Sys_SaveStates, // Opens save states submenu
|
||||||
|
@ -763,7 +762,6 @@ extern void UI_EnableStateActions();
|
||||||
extern void UI_DisableSysActions();
|
extern void UI_DisableSysActions();
|
||||||
extern void UI_EnableSysActions();
|
extern void UI_EnableSysActions();
|
||||||
|
|
||||||
extern void UI_DisableSysReset();
|
|
||||||
extern void UI_DisableSysShutdown();
|
extern void UI_DisableSysShutdown();
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -203,8 +203,6 @@ void MainEmuFrame::ConnectMenus()
|
||||||
Bind(wxEVT_MENU, &MainEmuFrame::Menu_EnableHostFs_Click, this, MenuId_EnableHostFs);
|
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_SysShutdown_Click, this, MenuId_Sys_Shutdown);
|
||||||
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Exit_Click, this, MenuId_Exit);
|
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
|
// CDVD
|
||||||
Bind(wxEVT_MENU, &MainEmuFrame::Menu_IsoBrowse_Click, this, MenuId_IsoBrowse);
|
Bind(wxEVT_MENU, &MainEmuFrame::Menu_IsoBrowse_Click, this, MenuId_IsoBrowse);
|
||||||
|
@ -593,15 +591,10 @@ void MainEmuFrame::ApplyCoreStatus()
|
||||||
{
|
{
|
||||||
wxMenuBar& menubar( *GetMenuBar() );
|
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
|
// [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
|
// dispatcher, and modify their states accordingly. This is just a hack (for now) -- air
|
||||||
|
|
||||||
bool ActiveVM = SysHasValidState();
|
if (wxMenuItem* susres = menubar.FindItem(MenuId_Sys_SuspendResume))
|
||||||
|
|
||||||
if( susres )
|
|
||||||
{
|
{
|
||||||
if( !CoreThread.IsClosing() )
|
if( !CoreThread.IsClosing() )
|
||||||
{
|
{
|
||||||
|
@ -611,6 +604,7 @@ void MainEmuFrame::ApplyCoreStatus()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
bool ActiveVM = SysHasValidState();
|
||||||
susres->Enable(ActiveVM);
|
susres->Enable(ActiveVM);
|
||||||
if( 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 CDVD_SourceType Source = g_Conf->CdvdSource;
|
||||||
const MenuIdentifiers fullboot_id = MenuId_Boot_CDVD;
|
const MenuIdentifiers fullboot_id = MenuId_Boot_CDVD;
|
||||||
const MenuIdentifiers fastboot_id = MenuId_Boot_CDVD2;
|
const MenuIdentifiers fastboot_id = MenuId_Boot_CDVD2;
|
||||||
|
@ -680,7 +660,6 @@ void MainEmuFrame::ApplyCoreStatus()
|
||||||
|
|
||||||
if (wxMenuItem *cdvd_full = menubar.FindItem(fullboot_id))
|
if (wxMenuItem *cdvd_full = menubar.FindItem(fullboot_id))
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (Source)
|
switch (Source)
|
||||||
{
|
{
|
||||||
case CDVD_SourceType::Iso:
|
case CDVD_SourceType::Iso:
|
||||||
|
|
|
@ -185,7 +185,6 @@ protected:
|
||||||
void Menu_Exit_Click(wxCommandEvent &event);
|
void Menu_Exit_Click(wxCommandEvent &event);
|
||||||
|
|
||||||
void Menu_SuspendResume_Click(wxCommandEvent &event);
|
void Menu_SuspendResume_Click(wxCommandEvent &event);
|
||||||
void Menu_SysReset_Click(wxCommandEvent &event);
|
|
||||||
void Menu_SysShutdown_Click(wxCommandEvent &event);
|
void Menu_SysShutdown_Click(wxCommandEvent &event);
|
||||||
|
|
||||||
void Menu_ConfigPlugin_Click(wxCommandEvent &event);
|
void Menu_ConfigPlugin_Click(wxCommandEvent &event);
|
||||||
|
|
|
@ -544,12 +544,6 @@ void MainEmuFrame::Menu_SuspendResume_Click(wxCommandEvent &event)
|
||||||
GetSysExecutorThread().PostEvent( new SysExecEvent_ToggleSuspend() );
|
GetSysExecutorThread().PostEvent( new SysExecEvent_ToggleSuspend() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainEmuFrame::Menu_SysReset_Click(wxCommandEvent &event)
|
|
||||||
{
|
|
||||||
UI_DisableSysReset();
|
|
||||||
sApp.SysExecute();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainEmuFrame::Menu_SysShutdown_Click(wxCommandEvent &event)
|
void MainEmuFrame::Menu_SysShutdown_Click(wxCommandEvent &event)
|
||||||
{
|
{
|
||||||
//if( !SysHasValidState() && !CorePlugins.AreAnyInitialized() ) return;
|
//if( !SysHasValidState() && !CorePlugins.AreAnyInitialized() ) return;
|
||||||
|
|
|
@ -50,19 +50,10 @@ void UI_UpdateSysControls()
|
||||||
_SaveLoadStuff( SysHasValidState() );
|
_SaveLoadStuff( SysHasValidState() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void UI_DisableSysReset()
|
|
||||||
{
|
|
||||||
if( wxGetApp().Rpc_TryInvokeAsync( UI_DisableSysReset ) ) return;
|
|
||||||
sMainFrame.EnableMenuItem( MenuId_Sys_Restart, false );
|
|
||||||
|
|
||||||
_SaveLoadStuff( false );
|
|
||||||
}
|
|
||||||
|
|
||||||
void UI_DisableSysShutdown()
|
void UI_DisableSysShutdown()
|
||||||
{
|
{
|
||||||
if( wxGetApp().Rpc_TryInvokeAsync( &UI_DisableSysShutdown ) ) return;
|
if( wxGetApp().Rpc_TryInvokeAsync( &UI_DisableSysShutdown ) ) return;
|
||||||
|
|
||||||
sMainFrame.EnableMenuItem( MenuId_Sys_Restart, false );
|
|
||||||
sMainFrame.EnableMenuItem( MenuId_Sys_Shutdown, false );
|
sMainFrame.EnableMenuItem( MenuId_Sys_Shutdown, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,7 +61,6 @@ void UI_EnableSysShutdown()
|
||||||
{
|
{
|
||||||
if( wxGetApp().Rpc_TryInvokeAsync( &UI_EnableSysShutdown ) ) return;
|
if( wxGetApp().Rpc_TryInvokeAsync( &UI_EnableSysShutdown ) ) return;
|
||||||
|
|
||||||
sMainFrame.EnableMenuItem( MenuId_Sys_Restart, true );
|
|
||||||
sMainFrame.EnableMenuItem( MenuId_Sys_Shutdown, true );
|
sMainFrame.EnableMenuItem( MenuId_Sys_Shutdown, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +69,6 @@ void UI_DisableSysActions()
|
||||||
{
|
{
|
||||||
if( wxGetApp().Rpc_TryInvokeAsync( &UI_DisableSysActions ) ) return;
|
if( wxGetApp().Rpc_TryInvokeAsync( &UI_DisableSysActions ) ) return;
|
||||||
|
|
||||||
sMainFrame.EnableMenuItem( MenuId_Sys_Restart, false );
|
|
||||||
sMainFrame.EnableMenuItem( MenuId_Sys_Shutdown, false );
|
sMainFrame.EnableMenuItem( MenuId_Sys_Shutdown, false );
|
||||||
|
|
||||||
_SaveLoadStuff( false );
|
_SaveLoadStuff( false );
|
||||||
|
@ -89,7 +78,6 @@ void UI_EnableSysActions()
|
||||||
{
|
{
|
||||||
if( wxGetApp().Rpc_TryInvokeAsync( &UI_EnableSysActions ) ) return;
|
if( wxGetApp().Rpc_TryInvokeAsync( &UI_EnableSysActions ) ) return;
|
||||||
|
|
||||||
sMainFrame.EnableMenuItem( MenuId_Sys_Restart, true );
|
|
||||||
sMainFrame.EnableMenuItem( MenuId_Sys_Shutdown, true );
|
sMainFrame.EnableMenuItem( MenuId_Sys_Shutdown, true );
|
||||||
|
|
||||||
_SaveLoadStuff( true );
|
_SaveLoadStuff( true );
|
||||||
|
|
Loading…
Reference in New Issue