Merge branch 'stable'
This commit is contained in:
commit
809e480973
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue