From cc6b55ee2a29aa54dace480ecf5dd8bef6258b72 Mon Sep 17 00:00:00 2001 From: skidau Date: Wed, 4 Feb 2015 23:23:52 +1100 Subject: [PATCH] Fixed the save state hotkeys so that they work with the Render to Main Window option. --- Source/Core/DolphinWX/Frame.cpp | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 82a089eb7e..7e19c092fa 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -1398,25 +1398,22 @@ void CFrame::ParseHotkeys(wxKeyEvent &event) } unsigned int i = NUM_HOTKEYS; - if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain || TASInputHasFocus()) + for (i = 0; i < NUM_HOTKEYS; i++) { - for (i = 0; i < NUM_HOTKEYS; i++) + if (IsHotkey(event, i)) { - if (IsHotkey(event, i)) + int cmd = GetCmdForHotkey(i); + if (cmd >= 0) { - int cmd = GetCmdForHotkey(i); - if (cmd >= 0) + wxCommandEvent evt(wxEVT_MENU, cmd); + wxMenuItem *item = GetMenuBar()->FindItem(cmd); + if (item && item->IsCheckable()) { - wxCommandEvent evt(wxEVT_MENU, cmd); - wxMenuItem *item = GetMenuBar()->FindItem(cmd); - if (item && item->IsCheckable()) - { - item->wxMenuItemBase::Toggle(); - evt.SetInt(item->IsChecked()); - } - GetEventHandler()->AddPendingEvent(evt); - break; + item->wxMenuItemBase::Toggle(); + evt.SetInt(item->IsChecked()); } + GetEventHandler()->AddPendingEvent(evt); + break; } } }