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,