diff options
| author | Jules Blok <jules.blok@gmail.com> | 2015-07-25 13:02:13 +0200 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2015-07-25 13:02:13 +0200 |
| commit | dfe5ed54a41e150fe0e8435abcb884a3fa8862eb (patch) | |
| tree | 2231637b3a48d76b2a3eff97c18ab2f82bf8d91f /Source/Core/DolphinWX/FrameTools.cpp | |
| parent | fbd5bb815cf422f45b67ae9d5db7fdce5ab3b28f (diff) | |
| parent | 8eee13e7af68f5f3e93389292c2fc499dc7a13b1 (diff) | |
Merge pull request #2770 from Armada651/modal-hotkeys
FrameTools: Disable hotkeys while a modal dialog is shown.
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/FrameTools.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index 1193be6674..eab7d50328 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -1154,7 +1154,9 @@ void CFrame::DoStop() wxYES_NO | wxSTAY_ON_TOP | wxICON_EXCLAMATION, wxDefaultPosition); + HotkeyManagerEmu::Enable(false); int Ret = m_StopDlg.ShowModal(); + HotkeyManagerEmu::Enable(true); if (Ret != wxID_YES) { Core::SetState(state); @@ -1298,29 +1300,37 @@ void CFrame::OnReset(wxCommandEvent& WXUNUSED (event)) void CFrame::OnConfigMain(wxCommandEvent& WXUNUSED (event)) { CConfigMain ConfigMain(this); + HotkeyManagerEmu::Enable(false); if (ConfigMain.ShowModal() == wxID_OK) m_GameListCtrl->Update(); + HotkeyManagerEmu::Enable(true); UpdateGUI(); } void CFrame::OnConfigGFX(wxCommandEvent& WXUNUSED (event)) { + HotkeyManagerEmu::Enable(false); if (g_video_backend) g_video_backend->ShowConfig(this); + HotkeyManagerEmu::Enable(true); } void CFrame::OnConfigAudio(wxCommandEvent& WXUNUSED (event)) { CConfigMain ConfigMain(this); ConfigMain.SetSelectedTab(CConfigMain::ID_AUDIOPAGE); + HotkeyManagerEmu::Enable(false); if (ConfigMain.ShowModal() == wxID_OK) m_GameListCtrl->Update(); + HotkeyManagerEmu::Enable(true); } void CFrame::OnConfigControllers(wxCommandEvent& WXUNUSED (event)) { ControllerConfigDiag config_dlg(this); + HotkeyManagerEmu::Enable(false); config_dlg.ShowModal(); + HotkeyManagerEmu::Enable(true); } void CFrame::OnConfigHotkey(wxCommandEvent& WXUNUSED (event)) @@ -1365,7 +1375,9 @@ void CFrame::OnHelp(wxCommandEvent& event) case wxID_ABOUT: { AboutDolphin frame(this); + HotkeyManagerEmu::Enable(false); frame.ShowModal(); + HotkeyManagerEmu::Enable(true); } break; case IDM_HELP_WEBSITE: @@ -1425,7 +1437,9 @@ void CFrame::OnNetPlay(wxCommandEvent& WXUNUSED (event)) void CFrame::OnMemcard(wxCommandEvent& WXUNUSED (event)) { CMemcardManager MemcardManager(this); + HotkeyManagerEmu::Enable(false); MemcardManager.ShowModal(); + HotkeyManagerEmu::Enable(true); } void CFrame::OnExportAllSaves(wxCommandEvent& WXUNUSED (event)) |
