FrameTools: Disable hotkeys while a modal dialog is shown.

This commit is contained in:
Jules Blok 2015-07-23 09:09:01 +02:00
parent 0092f5207b
commit 75fc213359
1 changed files with 14 additions and 0 deletions

View File

@ -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))