This commit is contained in:
Rachael Alexanderson 2017-03-25 11:19:27 -04:00
commit 71ad6c9651
2 changed files with 16 additions and 0 deletions

View file

@ -487,4 +487,5 @@ void F2DDrawer::Clear()
{ {
mVertices.Clear(); mVertices.Clear();
mData.Clear(); mData.Clear();
mLastLineCmd = -1;
} }

View file

@ -626,6 +626,11 @@ void ProcessKeyboardFlagsEvent(NSEvent* theEvent)
void ProcessMouseMoveEvent(NSEvent* theEvent) void ProcessMouseMoveEvent(NSEvent* theEvent)
{ {
if (!use_mouse)
{
return;
}
if (GUICapture) if (GUICapture)
{ {
ProcessMouseMoveInMenu(theEvent); ProcessMouseMoveInMenu(theEvent);
@ -638,6 +643,11 @@ void ProcessMouseMoveEvent(NSEvent* theEvent)
void ProcessMouseButtonEvent(NSEvent* theEvent) void ProcessMouseButtonEvent(NSEvent* theEvent)
{ {
if (!use_mouse)
{
return;
}
event_t event = {}; event_t event = {};
const NSEventType cocoaEventType = [theEvent type]; const NSEventType cocoaEventType = [theEvent type];
@ -690,6 +700,11 @@ void ProcessMouseButtonEvent(NSEvent* theEvent)
void ProcessMouseWheelEvent(NSEvent* theEvent) void ProcessMouseWheelEvent(NSEvent* theEvent)
{ {
if (!use_mouse)
{
return;
}
const int16_t modifiers = ModifierFlagsToGUIKeyModifiers(theEvent); const int16_t modifiers = ModifierFlagsToGUIKeyModifiers(theEvent);
const CGFloat delta = (modifiers & GKM_SHIFT) const CGFloat delta = (modifiers & GKM_SHIFT)
? [theEvent deltaX] ? [theEvent deltaX]