diff options
| author | Jules Blok <jules.blok@gmail.com> | 2015-07-20 16:04:18 +0200 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2015-07-20 16:04:18 +0200 |
| commit | 809e480973a239778f5b2ae3cc69aba31e7d31a2 (patch) | |
| tree | faba366174997fbf167cbdcdecb3a68b4f717bd1 /Source/Core | |
| parent | ad68de59bcfe8aa7c84d4d66db4abd25c4477090 (diff) | |
| parent | b5fe028e185402835b86003183e61c0a2b26b6bf (diff) | |
Merge branch 'stable'
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinWX/Frame.cpp | 14 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/Frame.h | 2 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/FrameTools.cpp | 1 |
3 files changed, 15 insertions, 2 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 5a8a6cfe41..94b8062206 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -1085,6 +1085,20 @@ bool TASInputHasFocus() return false; } +void CFrame::OnKeyDown(wxKeyEvent& event) +{ + // On OS X, we claim all keyboard events while + // emulation is running to avoid wxWidgets sounding + // the system beep for unhandled key events when + // receiving pad/Wiimote keypresses which take an + // entirely different path through the HID subsystem. +#ifndef __APPLE__ + // On other platforms, we leave the key event alone + // so it can be passed on to the windowing system. + event.Skip(); +#endif +} + void CFrame::OnMouse(wxMouseEvent& event) { // next handlers are all for FreeLook, so we don't need to check them if disabled diff --git a/Source/Core/DolphinWX/Frame.h b/Source/Core/DolphinWX/Frame.h index 4460593497..abb712b3c1 100644 --- a/Source/Core/DolphinWX/Frame.h +++ b/Source/Core/DolphinWX/Frame.h @@ -320,8 +320,6 @@ private: void OnToggleWindow(wxCommandEvent& event); void OnKeyDown(wxKeyEvent& event); // Keyboard - void OnKeyUp(wxKeyEvent& event); - void OnMouse(wxMouseEvent& event); // Mouse void OnFocusChange(wxFocusEvent& event); diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index c7074df4c3..1193be6674 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -1047,6 +1047,7 @@ void CFrame::StartGame(const std::string& filename) m_RenderParent->SetFocus(); + wxTheApp->Bind(wxEVT_KEY_DOWN, &CFrame::OnKeyDown, this); wxTheApp->Bind(wxEVT_RIGHT_DOWN, &CFrame::OnMouse, this); wxTheApp->Bind(wxEVT_RIGHT_UP, &CFrame::OnMouse, this); wxTheApp->Bind(wxEVT_MIDDLE_DOWN, &CFrame::OnMouse, this); |
