From 79ac3d28699f518d73e23bc5502022b0952e02be Mon Sep 17 00:00:00 2001 From: codeanticode Date: Wed, 14 Aug 2013 11:36:17 -0400 Subject: [PATCH] Replaced getWheelRotation() with getRotation() --- core/src/processing/opengl/PGL.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/src/processing/opengl/PGL.java b/core/src/processing/opengl/PGL.java index 354b01e72..b5993a1cd 100644 --- a/core/src/processing/opengl/PGL.java +++ b/core/src/processing/opengl/PGL.java @@ -2699,10 +2699,13 @@ public class PGL { } } - @SuppressWarnings("deprecation") - int peCount = peAction == MouseEvent.WHEEL ? - (int) nativeEvent.getWheelRotation() : - nativeEvent.getClickCount(); + int peCount = 0; + if (peAction == MouseEvent.WHEEL) { + peCount = nativeEvent.isShiftDown() ? (int)nativeEvent.getRotation()[0] : + (int)nativeEvent.getRotation()[1]; + } else { + peCount = nativeEvent.getClickCount(); + } MouseEvent me = new MouseEvent(nativeEvent, nativeEvent.getWhen(), peAction, peModifiers,