- fixed excess keyboard events in Cocoa backend

https://forum.zdoom.org/viewtopic.php?t=61104
(cherry picked from commit c30505d02a)
This commit is contained in:
alexey.lysiuk 2018-06-29 11:33:59 +03:00 committed by drfrag666
parent 2b27531b53
commit 4cb4d65698

View file

@ -559,11 +559,13 @@ void ProcessKeyboardEvent(NSEvent* theEvent)
return;
}
const bool isARepeat = [theEvent isARepeat];
if (k_allowfullscreentoggle
&& (kVK_ANSI_F == keyCode)
&& (NSCommandKeyMask & [theEvent modifierFlags])
&& (NSKeyDown == [theEvent type])
&& ![theEvent isARepeat])
&& !isARepeat)
{
ToggleFullscreen = !ToggleFullscreen;
return;
@ -573,7 +575,7 @@ void ProcessKeyboardEvent(NSEvent* theEvent)
{
ProcessKeyboardEventInMenu(theEvent);
}
else
else if (!isARepeat)
{
event_t event = {};