From fcaaa9f649ebeb9afeb33db8a67644c977b2c1af Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 10 May 2015 03:34:55 -0400 Subject: [PATCH] HotkeyDlg: Fix keypress event binding Previously no keypresses would be recognized during the button press phase. --- Source/Core/DolphinWX/HotkeyDlg.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/Core/DolphinWX/HotkeyDlg.cpp b/Source/Core/DolphinWX/HotkeyDlg.cpp index 88dcb599dd..d0d5326302 100644 --- a/Source/Core/DolphinWX/HotkeyDlg.cpp +++ b/Source/Core/DolphinWX/HotkeyDlg.cpp @@ -48,7 +48,6 @@ void HotkeyConfigDialog::SaveButtonMapping(int Id, int Key, int Modkey) void HotkeyConfigDialog::EndGetButtons() { - Unbind(wxEVT_KEY_DOWN, &HotkeyConfigDialog::OnKeyDown, this); m_ButtonMappingTimer.Stop(); GetButtonWaitingTimer = 0; GetButtonWaitingID = 0; @@ -162,8 +161,6 @@ void HotkeyConfigDialog::OnButtonClick(wxCommandEvent& event) if (m_ButtonMappingTimer.IsRunning()) return; - Bind(wxEVT_KEY_DOWN, &HotkeyConfigDialog::OnKeyDown, this); - // Get the button ClickedButton = (wxButton *)event.GetEventObject(); SetEscapeId(wxID_CANCEL); @@ -328,6 +325,7 @@ void HotkeyConfigDialog::CreateHotkeyGUIControls() m_Button_Hotkeys[i] = new wxButton(Page, i, wxEmptyString, wxDefaultPosition, size); m_Button_Hotkeys[i]->SetFont(m_SmallFont); m_Button_Hotkeys[i]->SetToolTip(_("Left click to detect hotkeys.\nEnter space to clear.")); + m_Button_Hotkeys[i]->Bind(wxEVT_KEY_DOWN, &HotkeyConfigDialog::OnKeyDown, this); SetButtonText(i, WxUtils::WXKeyToString(SConfig::GetInstance().m_LocalCoreStartupParameter.iHotkey[i]), WxUtils::WXKeymodToString(