From f367fa5a980d83af06b3af20b9ef8e83696a94bc Mon Sep 17 00:00:00 2001 From: Akash Date: Sat, 5 Nov 2016 23:18:23 +0530 Subject: [PATCH] PCSX2-WX: Fix Shutdown menu item behavior There is already a dedicated bind event to handle the gray out of the menu item, so let's just gray it out initially and let the bind event handler do it's thing. The previous behavior would only gray out the menu item when all the plugins are in a non-active state which didn't seem ideal as the plugins were shutdown only when closing PCSX2 (or) switching plugins. --- pcsx2/gui/MainFrame.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pcsx2/gui/MainFrame.cpp b/pcsx2/gui/MainFrame.cpp index 0e0bc4a1ca..28ad795694 100644 --- a/pcsx2/gui/MainFrame.cpp +++ b/pcsx2/gui/MainFrame.cpp @@ -448,6 +448,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title) m_menuSys.Append(MenuId_Sys_Shutdown, _("Shut&down"), _("Wipes all internal VM states and shuts down plugins.")); + m_menuSys.FindItem(MenuId_Sys_Shutdown)->Enable(false); m_menuSys.Append(MenuId_Exit, _("E&xit"), AddAppName(_("Closing %s may be hazardous to your health"))); @@ -671,8 +672,6 @@ void MainEmuFrame::ApplyCoreStatus() cdvd2->SetHelp(_("Use fast boot to skip PS2 startup and splash screens")); } } - - menubar.Enable( MenuId_Sys_Shutdown, SysHasValidState() || CorePlugins.AreAnyInitialized() ); } //Apply a config to the menu such that the menu reflects it properly