summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/FrameTools.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2015-07-23 09:09:01 +0200
committerJules Blok <jules.blok@gmail.com>2015-07-23 09:09:01 +0200
commit8eee13e7af68f5f3e93389292c2fc499dc7a13b1 (patch)
tree0cf92c155d12846f1aeaed0f9369fb811020fba4 /Source/Core/DolphinWX/FrameTools.cpp
parent2c7ae7787d7c5f564b0acc52b7a8f23263c47b2e (diff)
FrameTools: Disable hotkeys while a modal dialog is shown.
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
-rw-r--r--Source/Core/DolphinWX/FrameTools.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp
index a54677423d..8addacc7f7 100644
--- a/Source/Core/DolphinWX/FrameTools.cpp
+++ b/Source/Core/DolphinWX/FrameTools.cpp
@@ -1153,7 +1153,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);
@@ -1297,29 +1299,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))
@@ -1364,7 +1374,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:
@@ -1424,7 +1436,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))