mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 23:12:24 +00:00
- fixed excess keyboard events in Cocoa backend
https://forum.zdoom.org/viewtopic.php?t=61104
This commit is contained in:
parent
a968aeba8a
commit
c30505d02a
1 changed files with 4 additions and 2 deletions
|
@ -559,11 +559,13 @@ void ProcessKeyboardEvent(NSEvent* theEvent)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool isARepeat = [theEvent isARepeat];
|
||||||
|
|
||||||
if (k_allowfullscreentoggle
|
if (k_allowfullscreentoggle
|
||||||
&& (kVK_ANSI_F == keyCode)
|
&& (kVK_ANSI_F == keyCode)
|
||||||
&& (NSCommandKeyMask & [theEvent modifierFlags])
|
&& (NSCommandKeyMask & [theEvent modifierFlags])
|
||||||
&& (NSKeyDown == [theEvent type])
|
&& (NSKeyDown == [theEvent type])
|
||||||
&& ![theEvent isARepeat])
|
&& !isARepeat)
|
||||||
{
|
{
|
||||||
ToggleFullscreen = !ToggleFullscreen;
|
ToggleFullscreen = !ToggleFullscreen;
|
||||||
return;
|
return;
|
||||||
|
@ -573,7 +575,7 @@ void ProcessKeyboardEvent(NSEvent* theEvent)
|
||||||
{
|
{
|
||||||
ProcessKeyboardEventInMenu(theEvent);
|
ProcessKeyboardEventInMenu(theEvent);
|
||||||
}
|
}
|
||||||
else
|
else if (!isARepeat)
|
||||||
{
|
{
|
||||||
event_t event = {};
|
event_t event = {};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue