Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossVR committed Jul 20, 2015
2 parents ad68de5 + b5fe028 commit 809e480
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
14 changes: 14 additions & 0 deletions Source/Core/DolphinWX/Frame.cpp
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/DolphinWX/Frame.h
Expand Up @@ -320,8 +320,6 @@ class CFrame : public CRenderFrame
void OnToggleWindow(wxCommandEvent& event);

void OnKeyDown(wxKeyEvent& event); // Keyboard
void OnKeyUp(wxKeyEvent& event);

void OnMouse(wxMouseEvent& event); // Mouse

void OnFocusChange(wxFocusEvent& event);
Expand Down
1 change: 1 addition & 0 deletions Source/Core/DolphinWX/FrameTools.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 809e480

Please sign in to comment.