mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 17:41:19 +00:00
- 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:
parent
2b27531b53
commit
4cb4d65698
1 changed files with 4 additions and 2 deletions
|
@ -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 = {};
|
||||
|
||||
|
|
Loading…
Reference in a new issue