mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 15:22:16 +00:00
Mouse input can now be disabled completely in Cocoa backend
This commit is contained in:
parent
04057b8b91
commit
80f3c1ed81
1 changed files with 15 additions and 0 deletions
|
@ -626,6 +626,11 @@ void ProcessKeyboardFlagsEvent(NSEvent* theEvent)
|
|||
|
||||
void ProcessMouseMoveEvent(NSEvent* theEvent)
|
||||
{
|
||||
if (!use_mouse)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (GUICapture)
|
||||
{
|
||||
ProcessMouseMoveInMenu(theEvent);
|
||||
|
@ -638,6 +643,11 @@ void ProcessMouseMoveEvent(NSEvent* theEvent)
|
|||
|
||||
void ProcessMouseButtonEvent(NSEvent* theEvent)
|
||||
{
|
||||
if (!use_mouse)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
event_t event = {};
|
||||
|
||||
const NSEventType cocoaEventType = [theEvent type];
|
||||
|
@ -690,6 +700,11 @@ void ProcessMouseButtonEvent(NSEvent* theEvent)
|
|||
|
||||
void ProcessMouseWheelEvent(NSEvent* theEvent)
|
||||
{
|
||||
if (!use_mouse)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const int16_t modifiers = ModifierFlagsToGUIKeyModifiers(theEvent);
|
||||
const CGFloat delta = (modifiers & GKM_SHIFT)
|
||||
? [theEvent deltaX]
|
||||
|
|
Loading…
Reference in a new issue