- fixed excess keyboard events in Cocoa backend

https://forum.zdoom.org/viewtopic.php?t=61104
This commit is contained in:
alexey.lysiuk 2018-06-29 11:33:59 +03:00
parent a968aeba8a
commit c30505d02a

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 = {};