diff --git a/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m b/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m index 8c9cd6f692..28808b9502 100644 --- a/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m +++ b/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m @@ -263,11 +263,15 @@ - (void) recordMouseEvent:(NSEvent *)theEvent fromView: (NSView *) aView{ [self recordMouseEvent: theEvent fromView: aView]; + static float prevXDelta = 0; + static float prevYDelta = 0; + static int prevXTime = 0; + static int prevYTime = 0; #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7) CGFloat x = [theEvent scrollingDeltaX]; CGFloat y = [theEvent scrollingDeltaY]; - int xDelta = x * 120; - int yDelta = y * 120; + float xDelta = x * 120; + float yDelta = y * 120; if ([theEvent respondsToSelector:@selector(hasPreciseScrollingDeltas)]) { if ([theEvent hasPreciseScrollingDeltas]) { xDelta = x; @@ -277,21 +281,33 @@ - (void) recordWheelEvent:(NSEvent *) theEvent fromView: (NSView