mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 15:55:31 +01:00
Frame: Fix macOS keyboard while emulation is running
This commit is contained in:
parent
f94cd57a70
commit
a793b4d06f
@ -1040,12 +1040,20 @@ static int GetMenuIDFromHotkey(unsigned int key)
|
|||||||
|
|
||||||
void CFrame::OnKeyDown(wxKeyEvent& event)
|
void CFrame::OnKeyDown(wxKeyEvent& event)
|
||||||
{
|
{
|
||||||
// On OS X, we claim all keyboard events while
|
#ifdef __APPLE__
|
||||||
// emulation is running to avoid wxWidgets sounding
|
// On OS X, we claim all keyboard events while
|
||||||
// the system beep for unhandled key events when
|
// emulation is running to avoid wxWidgets sounding
|
||||||
// receiving pad/Wiimote keypresses which take an
|
// the system beep for unhandled key events when
|
||||||
// entirely different path through the HID subsystem.
|
// receiving pad/Wiimote keypresses which take an
|
||||||
#ifndef __APPLE__
|
// entirely different path through the HID subsystem.
|
||||||
|
if (!m_bRendererHasFocus)
|
||||||
|
{
|
||||||
|
// We do however want to pass events on when the
|
||||||
|
// render window is out of focus: this allows use
|
||||||
|
// of the keyboard in the rest of the UI.
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
#else
|
||||||
// On other platforms, we leave the key event alone
|
// On other platforms, we leave the key event alone
|
||||||
// so it can be passed on to the windowing system.
|
// so it can be passed on to the windowing system.
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user