From 80f3c1ed81943eb69e3a530608b3d590790e1a4c Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 25 Mar 2017 11:04:06 +0200 Subject: [PATCH 1/2] Mouse input can now be disabled completely in Cocoa backend --- src/posix/cocoa/i_input.mm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/posix/cocoa/i_input.mm b/src/posix/cocoa/i_input.mm index 53afa8536..08745e687 100644 --- a/src/posix/cocoa/i_input.mm +++ b/src/posix/cocoa/i_input.mm @@ -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] From 093a05b5886c12ef168de5fec3e7b2e651a6579e Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 25 Mar 2017 11:32:39 +0200 Subject: [PATCH 2/2] Reset OpenGL 2D drawer state fully on each frame https://mantis.zdoom.org/view.php?id=469 --- src/gl/renderer/gl_2ddrawer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gl/renderer/gl_2ddrawer.cpp b/src/gl/renderer/gl_2ddrawer.cpp index d95bb9eed..3f4f74cc5 100644 --- a/src/gl/renderer/gl_2ddrawer.cpp +++ b/src/gl/renderer/gl_2ddrawer.cpp @@ -487,4 +487,5 @@ void F2DDrawer::Clear() { mVertices.Clear(); mData.Clear(); + mLastLineCmd = -1; }